473,396 Members | 2,059 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,396 software developers and data experts.

Update DetailsView fails with @ is not a parameter for procedure

Hi,
I am just learning .Net and I am developing an appplication using VWD 2005 Express Edition and C# language.
I have created a stored procedure
CREATE PROCEDURE SPROC_UPDATE_VENDORINFO
@VENDOR_ID VARCHAR(30)
@VENDOR_NAME VARCHAR(45),
@REPAIR_PHONE VARCHAR(12),
@REPAIR_PHONE_EXT VARCHAR(5),
@CUST_SERVICE_PHONE VARCHAR(12),
@CUST_SERVICE_PHONE_EXT VARCHAR(5),
@CUST_SERVICE_CONTACT VARCHAR(12),
@SALES_PHONE VARCHAR(12),
@SALES_PHONE_EXT VARCHAR(5),
@SALES_CONTACT VARCHAR(25),
@VENDOR_NOTES VARCHAR(100))
AS
UPDATE TELECOM_VENDORS
SET VENDOR_NAME=@VENDOR_NAME
,REPAIR_PHONE=@REPAIR_PHONE
,REPAIR_PHONE_EXT = @REPAIR_PHONE_EXT
,CUST_SERVICE_PHONE=@CUST_SERVICE_PHONE
,CUST_SERVICE_PHONE_EXT=@CUST_SERVICE_PHONE_EXT
,CUST_SERVICE_CONTACT=@CUST_SERVICE_CONTACT
,SALES_PHONE=@SALES_PHONE
,SALES_PHONE_EXT = @SALES_PHONE_EXT
,SALES_CONTACT=@SALES_CONTACT
,VENDOR_NOTES=@VENDOR_NOTES
WHERE VENDOR_ID =@VENDOR_ID
GO




VENDOR_ID is coming from a DDlist.

When I use the Edit button in DetailsView which calls the above procedure,. I get the Error

@ is not a parameter for procedure
May I know what is wrong in this procedure.
Aug 20 '07 #1
1 1405
nateraaaa
663 Expert 512MB
Hi,
I am just learning .Net and I am developing an appplication using VWD 2005 Express Edition and C# language.
I have created a stored procedure
CREATE PROCEDURE SPROC_UPDATE_VENDORINFO
@VENDOR_ID VARCHAR(30)
@VENDOR_NAME VARCHAR(45),
@REPAIR_PHONE VARCHAR(12),
@REPAIR_PHONE_EXT VARCHAR(5),
@CUST_SERVICE_PHONE VARCHAR(12),
@CUST_SERVICE_PHONE_EXT VARCHAR(5),
@CUST_SERVICE_CONTACT VARCHAR(12),
@SALES_PHONE VARCHAR(12),
@SALES_PHONE_EXT VARCHAR(5),
@SALES_CONTACT VARCHAR(25),
@VENDOR_NOTES VARCHAR(100))
AS
UPDATE TELECOM_VENDORS
SET VENDOR_NAME=@VENDOR_NAME
,REPAIR_PHONE=@REPAIR_PHONE
,REPAIR_PHONE_EXT = @REPAIR_PHONE_EXT
,CUST_SERVICE_PHONE=@CUST_SERVICE_PHONE
,CUST_SERVICE_PHONE_EXT=@CUST_SERVICE_PHONE_EXT
,CUST_SERVICE_CONTACT=@CUST_SERVICE_CONTACT
,SALES_PHONE=@SALES_PHONE
,SALES_PHONE_EXT = @SALES_PHONE_EXT
,SALES_CONTACT=@SALES_CONTACT
,VENDOR_NOTES=@VENDOR_NOTES
WHERE VENDOR_ID =@VENDOR_ID
GO




VENDOR_ID is coming from a DDlist.

When I use the Edit button in DetailsView which calls the above procedure,. I get the Error

@ is not a parameter for procedure
May I know what is wrong in this procedure.

CREATE PROCEDURE SPROC_UPDATE_VENDORINFO
@VENDOR_ID VARCHAR(30) <--- Missing comma here

Nathan
Aug 20 '07 #2

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

Similar topics

4
by: jens Jensen | last post by:
Hello, I have an image file name in a table that a let users modify via a GridView/DetailView pair. * The actual image file is saved in the image folder of the application. But the image is...
0
by: troyblakely | last post by:
I have a gridview which is pulling data from a SqlDataSource, the select command queries a view and the update command is a stored procedure. I'm using a stored procedure because several tables...
4
by: Mark Olbert | last post by:
I am struggling with trying to retrieve the value of an autoincrement identity field after a DetailsView Insert operation. The DetailsView is bound to an SqlDataSource control. So far as I can...
3
by: dhaneshrs | last post by:
I have a gridview i managed to update using the edit option in the smartmenu. The problem comes when i delete a value or make a value read only. Say i have a table Employee with the following...
0
by: =?Utf-8?B?TmljayBCZW5uZXR0?= | last post by:
I've got a page with a DetailsView. It uses a SqlDataSource which itself uses stored procedures for Select and Update. I don't want the user to see some of the columns, but if I don't bind them...
5
by: Chris Cowles | last post by:
I use an application that uses Oracle 8.1.7. All functions of the application are completed with calls to stored procedures. A data entry error occurred that caused thousands of records to be...
0
by: jemitch0 | last post by:
I have a 2 column table that contains FK to other tables in my app. The 2 columns together form the PK for the table. I want to be able to update these values using a Detailsview, but can't get the...
1
JustRun
by: JustRun | last post by:
I have a problem with the select option at the gridview and gonna pull my hair out cause it doesn't work at all. Here is the Grid view code: I want to get the selected row when the user click...
2
by: sirdavethebrave | last post by:
Hi guys - I have written a form, and a stored procedure to update the said form. It really is as simple as that. A user can go into the form, update some fields and hit the update button to...
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:
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.