GridView Passing Unchanged Data on Updates

R

Rick

I have an uncomplicated GridView control bound to a SQLDataSource
control which hits a test SQL db that I have running locally. Upon
executing a series of UPDATEs in the GridView I am seeing intermittent
instances where the data doesn't update at all. A closer inspection
(using SQL Profiler) of the queries hitting the SQL Server shows that
the queries for the non-updating events are using the original values
for the update fields instead of the new values entered into the text
boxes. It doesn't happen all the time, but when it does it has the
same footprint - the new values are ignored and the old ones are passed
instead.

I am not doing anything unusual aside from programmatically building
the SQLDataSource.SelectCommand myself, using the same 'field1 =
@field1' syntax generated by the SQLDataSource wizard. I'm confident
in the syntax because a properly formed UPDATE statement is making it
to the database sometimes and the (as I mentioned, uncomplicated) code
handles each refresh of the page the same way. Does this outcome sound
familiar to anyone, and if so what did you do to ensure that all of
your updates executed with the correct values ? Thanks.

Rick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top