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: -
alter proc prr_out_projsearch_update1
-
-
@prr_id int,
-
@changes_required bit,
-
@NeedUpdate bit = 1,
-
@datecompleted datetime = null,
-
@poduedate datetime,
-
@designissues varchar(100),
-
@designissuesnotes text,
-
@documentationissues varchar(100),
-
@documentationissuesnotes text,
-
@detailissues varchar(100),
-
@detailissuesnotes text,
-
@ActionRequired bit = 1,
-
@ActionRequiredNotes text,
-
@ChangesCompleted bit = 1
-
-
As
-
set @datecompleted = current_timestamp
-
-
-
update tblprrin
-
set
-
changesrequired = @changes_required,
-
needupdate = @needupdate,
-
datecompleted = @datecompleted,
-
PODueDate = @poduedate,
-
designissues = @designissues,
-
designissuesnotes = @designissuesnotes,
-
documentationissues = @documentationissues,
-
documentationissuesnotes = @documentationissuesnotes,
-
detailissues = @detailissues,
-
detailissuesnotes = @detailissuesnotes,
-
ActionRequired = @ActionRequired,
-
ActionRequiredNotes = @ActionRequiredNotes,
-
ChangesCompleted = @ChangesCompleted
-
-
where prr_id = @prr_id
-
The following is the new code in the update section of asp.net: -
conn_r = New SqlConnection(ConfigurationManager.ConnectionStrings("prsdbConnectString").ConnectionString)
-
Dim cmd_r As SqlCommand
-
cmd_r = New SqlCommand("prr_out_projsearch_update1", conn_r)
-
cmd_r.CommandType = Data.CommandType.StoredProcedure
-
cmd_r.CommandTimeout = 0
-
-
-
cmd_r.Parameters.Add("@prr_id", Data.SqlDbType.Int)
-
-
cmd_r.Parameters("@prr_id").Value = Session("PRR_ID")
-
-
cmd_r.Parameters.Add("@changes_required", Data.SqlDbType.Bit)
-
cmd_r.Parameters("@changes_required").Value = 1
-
-
cmd_r.Parameters.Add("@poduedate", SqlDbType.DateTime)
-
cmd_r.Parameters("@poduedate").Value = CDate(txtDueDate.Text)
-
-
cmd_r.Parameters.Add("@designissues", Data.SqlDbType.VarChar)
-
cmd_r.Parameters("@designissues").Value = (DropDownList2.SelectedItem.Value)
-
-
cmd_r.Parameters.Add("@designissuesnotes", Data.SqlDbType.VarChar)
-
cmd_r.Parameters("@designissuesnotes").Value = txtDesignIssuesNotes.Text
-
-
cmd_r.Parameters.Add("@documentationissues", Data.SqlDbType.VarChar)
-
cmd_r.Parameters("@documentationissues").Value = (DropDownList3.SelectedItem.Value)
-
-
cmd_r.Parameters.Add("@documentationissuesnotes", Data.SqlDbType.VarChar)
-
cmd_r.Parameters("@documentationissuesnotes").Value = txtDocumentationIssuesNotes.Text
-
-
cmd_r.Parameters.Add("@detailissues", Data.SqlDbType.VarChar)
-
cmd_r.Parameters("@detailissues").Value = (DropDownList4.SelectedItem.Value)
-
-
cmd_r.Parameters.Add("@detailissuesnotes", Data.SqlDbType.VarChar)
-
cmd_r.Parameters("@detailissuesnotes").Value = txtDetailIssuesNotes.Text
-
-
-
-
cmd_r.Parameters.Add("@ActionRequired", Data.SqlDbType.Bit)
-
cmd_r.Parameters("@ActionRequired").Value = 1
-
-
-
cmd_r.Parameters.Add("@ActionRequiredNotes", Data.SqlDbType.VarChar)
-
cmd_r.Parameters("@ActionRequiredNotes").Value = txtActionRequiredNotes.Text
-
-
cmd_r.Parameters.Add("@ChangesCompleted", Data.SqlDbType.Bit)
-
cmd_r.Parameters("@ChangesCompleted").Value = 1
-
-
-
Try
-
-
conn_r.Open()
-
-
cmd_r.ExecuteNonQuery()
-
-
lblError1.Visible = True
-
-
lblError1.Text = "PRR updated"
-
-
-
-
Catch ex As Exception
-
-
lblError1.Visible = True
-
-
lblError1.Text = ex.Message
-
-
lblError2.Visible = True
-
-
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.
0 1146 Sign in to post your reply or Sign up for a free account.
Similar topics |
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
|
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...
|
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...
|
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...
|
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
| |
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
|
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...
|
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),
|
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...
|
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...
|
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...
| |
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...
|
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...
|
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...
|
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...
|
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...
|
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...
| |
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...
| |