GridView Passing Unchanged Data on Updates

Discussion in 'ASP .Net' started by Rick, Nov 30, 2006.

  1. Rick

    Rick Guest

    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
     
    Rick, Nov 30, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ahmed Jewahar
    Replies:
    1
    Views:
    4,755
    S. Justin Gengo [MCP]
    Jan 23, 2006
  2. Kevin D.
    Replies:
    4
    Views:
    355
    Kevin D.
    Mar 8, 2006
  3. Roedy Green

    detecting unchanged images

    Roedy Green, Jun 26, 2005, in forum: Java
    Replies:
    7
    Views:
    406
    Roedy Green
    Jun 27, 2005
  4. Bryan Parkoff
    Replies:
    1
    Views:
    349
    Malte Starostik
    Apr 5, 2005
  5. =?Utf-8?B?SklNLkgu?=

    q; DataSet RowState unchanged

    =?Utf-8?B?SklNLkgu?=, May 24, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    2,066
    =?Utf-8?B?SklNLkgu?=
    May 24, 2006
Loading...

Share This Page