Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Problem Using SqlDataSource to automatically Update Value of item in Gridview Row

Thread Tools

Problem Using SqlDataSource to automatically Update Value of item in Gridview Row

Vaughn Haybittle
Posts: n/a

I have a Gridview that binds to a SQL Server 2000 Database Table.

I have configured the SelectCommand, UpdateCommand, InsertCommand and
DeleteCommand of the SQL DataSource. All of these commands work except the
Update Command. The SQL for the Update Command is as follows: "UPDATE
tblInductionVenues SET inv_venue=@inv_venue WHERE inv_uid=@inv_uid"

I have the following questions:
1) Do I need to manually configure the parameters in the Command and
Parameter Editor, or should the fact that they are named according the the
convention above be enough fo rthem just to work?
2) If I do need to manually configure the parameters then how do I get a
handle on the textbox that appears when the gridview is in edit mode (I know
how to specify the inv_uid by setting it to the selectedvalue of the
3) Why is it that my DELETE and SELECT Commands work perfectly but not my
UPDATE command
4) Is there any way to debug what is happening while the SqlDataSource is
executing my UpdateCommand SQL (I know that I can use the updating and
updated events just before and after the update, but I want to capture
exectly what happens during the update)

Any advice would be appreciated.



Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert Row in GridView using SqlDataSource and update to database ? Luqman ASP .Net 5 11-22-2007 11:44 AM
Update SqlDataSource with value of DropDownList in EditTemplate on GridView ES ASP .Net Web Controls 0 06-16-2006 10:24 PM
GridView nested in DataList - refreshing corresponding DataList row after updating GridView row H5N1 ASP .Net 0 04-26-2006 11:41 PM
insert row using Gridview and SqlDataSource? =?Utf-8?B?RGFiYmxlcg==?= ASP .Net 2 03-20-2006 02:49 PM
Change style of a single row of the item list of datagrid, based on a field value of current item... QUASAR ASP .Net Datagrid Control 6 01-17-2004 07:46 PM