473,385 Members | 1,582 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Error message: @poduedate is not a parameter for procedure prr_out_projsearch_update1

4
Hi

I have a web form which is a part of asp.net application. This process updates a row of a table. This works fine. However I needed to add a DueDate field in the form and update the DueDate field in the back end as well. So I added the DueDate field in the form and changed the stored procedure and the corresponding code in asp.net. Now the update does not work.

I am getting the following error message:

@poduedate is not a parameter for procedure prr_out_projsearch_update1.

The following is the code for stored procedure:
Expand|Select|Wrap|Line Numbers
  1. alter proc prr_out_projsearch_update1 
  2.  
  3. @prr_id int,
  4. @changes_required bit,
  5. @NeedUpdate bit = 1,
  6. @datecompleted datetime = null,
  7. @poduedate datetime,
  8. @designissues varchar(100),
  9. @designissuesnotes text,
  10. @documentationissues varchar(100),
  11. @documentationissuesnotes text,
  12. @detailissues varchar(100),
  13. @detailissuesnotes text,
  14. @ActionRequired bit = 1,
  15. @ActionRequiredNotes text,
  16. @ChangesCompleted bit = 1
  17.  
  18. As
  19. set @datecompleted = current_timestamp
  20.  
  21.  
  22. update tblprrin
  23. set 
  24.      changesrequired = @changes_required,
  25.      needupdate = @needupdate,
  26.      datecompleted = @datecompleted,
  27.      PODueDate = @poduedate,
  28.      designissues =  @designissues,
  29.      designissuesnotes = @designissuesnotes,
  30.      documentationissues = @documentationissues,
  31.      documentationissuesnotes  = @documentationissuesnotes,
  32.      detailissues = @detailissues,
  33.      detailissuesnotes =  @detailissuesnotes,
  34.      ActionRequired = @ActionRequired,
  35.      ActionRequiredNotes = @ActionRequiredNotes,
  36.      ChangesCompleted = @ChangesCompleted
  37.  
  38. where prr_id = @prr_id
  39.  
The following is the new code in the update section of asp.net:
Expand|Select|Wrap|Line Numbers
  1. conn_r = New SqlConnection(ConfigurationManager.ConnectionStrings("prsdbConnectString").ConnectionString)
  2.             Dim cmd_r As SqlCommand
  3.             cmd_r = New SqlCommand("prr_out_projsearch_update1", conn_r)
  4.             cmd_r.CommandType = Data.CommandType.StoredProcedure
  5.             cmd_r.CommandTimeout = 0
  6.  
  7.  
  8. cmd_r.Parameters.Add("@prr_id", Data.SqlDbType.Int)
  9.  
  10.                 cmd_r.Parameters("@prr_id").Value = Session("PRR_ID")
  11.  
  12.                 cmd_r.Parameters.Add("@changes_required", Data.SqlDbType.Bit)
  13.                 cmd_r.Parameters("@changes_required").Value = 1
  14.  
  15.                 cmd_r.Parameters.Add("@poduedate", SqlDbType.DateTime)
  16.                 cmd_r.Parameters("@poduedate").Value = CDate(txtDueDate.Text)
  17.  
  18.                 cmd_r.Parameters.Add("@designissues", Data.SqlDbType.VarChar)
  19.                 cmd_r.Parameters("@designissues").Value = (DropDownList2.SelectedItem.Value)
  20.  
  21.                 cmd_r.Parameters.Add("@designissuesnotes", Data.SqlDbType.VarChar)
  22.                 cmd_r.Parameters("@designissuesnotes").Value = txtDesignIssuesNotes.Text
  23.  
  24.                 cmd_r.Parameters.Add("@documentationissues", Data.SqlDbType.VarChar)
  25.                 cmd_r.Parameters("@documentationissues").Value = (DropDownList3.SelectedItem.Value)
  26.  
  27.                 cmd_r.Parameters.Add("@documentationissuesnotes", Data.SqlDbType.VarChar)
  28.                 cmd_r.Parameters("@documentationissuesnotes").Value = txtDocumentationIssuesNotes.Text
  29.  
  30.                 cmd_r.Parameters.Add("@detailissues", Data.SqlDbType.VarChar)
  31.                 cmd_r.Parameters("@detailissues").Value = (DropDownList4.SelectedItem.Value)
  32.  
  33.                 cmd_r.Parameters.Add("@detailissuesnotes", Data.SqlDbType.VarChar)
  34.                 cmd_r.Parameters("@detailissuesnotes").Value = txtDetailIssuesNotes.Text
  35.  
  36.  
  37.  
  38.                 cmd_r.Parameters.Add("@ActionRequired", Data.SqlDbType.Bit)
  39.                 cmd_r.Parameters("@ActionRequired").Value = 1
  40.  
  41.  
  42.                 cmd_r.Parameters.Add("@ActionRequiredNotes", Data.SqlDbType.VarChar)
  43.                 cmd_r.Parameters("@ActionRequiredNotes").Value = txtActionRequiredNotes.Text
  44.  
  45.                 cmd_r.Parameters.Add("@ChangesCompleted", Data.SqlDbType.Bit)
  46.                 cmd_r.Parameters("@ChangesCompleted").Value = 1
  47.  
  48.  
  49. Try
  50.  
  51. conn_r.Open()
  52.  
  53. cmd_r.ExecuteNonQuery()
  54.  
  55. lblError1.Visible = True
  56.  
  57. lblError1.Text = "PRR updated"
  58.  
  59.  
  60.  
  61. Catch ex As Exception
  62.  
  63. lblError1.Visible = True
  64.  
  65. lblError1.Text = ex.Message
  66.  
  67. lblError2.Visible = True
  68.  
  69. lblError2.Text = "Record not added. Please report error message to system admin."


Here the date field addition should be an issue as it was working fine before. I would appreciate any help to resolve this issue. Thanks.
Mar 3 '09 #1
0 1140

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: DaylonRed | last post by:
Could someone help me out here? I have created a pretty large Stored Procedure with about 5 different parameters however, when I run the procedure I get the following error: "Syntax error...
9
by: Wally | last post by:
I am trying to display images from an Access 2000 database and I get an error "Invalid Parameter Used" when I execute the code line "picBLOB.Image = Image.FromStream(stmBLOBData)" in my Visual...
1
by: Dan | last post by:
I can't figure out this error message. Could someone please help. I have a text file in Notepad with the following 4 fields (Cont, Code, List, and Numb)all of which are single tab delimited, and a...
1
by: Jeremy Ames | last post by:
I have a datagrid that updates the table using a stored procedure. The stored procedure is confirmed to complete correctly, yet the sql data adapter is returning an error that my application is...
4
by: Jack | last post by:
Hi, I am trying to run an example code from a book. However I am getting the following error message: Number: -2147217900 Description: Syntax error or access violation Source: Microsoft OLE...
2
by: Scott | last post by:
I have a BeforeUpdate Event Procedure as below and got an error message. BeforeUpdate Event Procedure If IsNull() Then = Now() Else = Now() End If
3
by: Mike P | last post by:
I am repeatedly getting the error message 'error converting datatype varchar to bit'. I am passing a varchar variable to a stored procedure (where it is also a varchar) and then trying to write it...
4
by: barmatt80 | last post by:
I am stumped on the error reporting with sql server. I was told i need to return @SQLCode(code showing if successful or not) and @ErrMsg(and the message returned). I am clueless on this. I...
2
by: =?Utf-8?B?U3RldmVTNjA=?= | last post by:
I apparently made an unknown error. Now when I attempt to install two software packages I receive error messages. One package results in the message "The procedure entry point CallWindowProMF...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.