473,569 Members | 2,793 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error message: @poduedate is not a parameter for procedure prr_out_projsea rch_update1

4 New Member
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_projsea rch_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 1146

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

Similar topics

3
1508
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 converting the varchar value 'select..." Where do I even start to find this error? Thanks in advance
9
1966
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 Basic .Net application. I have researched MSDN for help and found the example article 321900 (see below) and set up a test and everything works fine...
1
1563
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 bunch of rows with values. I tried to create a macro (with the TransferText action) that would automatically import the values from those fields...
1
1585
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 catching. Everything within my stored procedure is contained within a transaction. When utilizing the sql profiler, we can see that the transaction...
4
6695
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 DB Provider for SQL Server SQLState: 42000
2
8620
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
2481
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 to a table (where it is also a varchar). I have no idea why it is trying to convert it to a bit, it is very puzzling. Has anybody else had an error...
4
5069
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 wrote this procedure: ALTER PROCEDURE . @Emp_SSN int, @Annual_Forward decimal(10,2),
2
3302
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 could not be located in the dynamic link library user32.dll. Attempting to install the other package results in exactly the same error message, but...
0
7695
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7612
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8119
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7668
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6281
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5509
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5218
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
936
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.