L
L.Peter
Hi Group,
Hope you can help me with this problem:
I have a gridview with sqldatasource bound to it.
updatestatement will call stored procedure. the table that being updated
called table1 has id, fld1,fld2, lastwritedatetime.
the selectstatement is select * from table1
The update stored procedure is very simple: update table1 set fld1=
@fld1,fld2=fld2 where id=@id.
before calling gridview_rowupdating, I'd like to check whether the record
was modified by someonelse. I am thinking of calling simple select
statement: select id from table1 where id= @id and lastwritedatetime =
@lastwritedatetime
Questions: How can I know which row the user is editing from gridview or
from sqldatasource, in the grid view, I did not include coulmns id and
lastwritedatetime as these columns are not relevant to users.
TIA
Peter
Hope you can help me with this problem:
I have a gridview with sqldatasource bound to it.
updatestatement will call stored procedure. the table that being updated
called table1 has id, fld1,fld2, lastwritedatetime.
the selectstatement is select * from table1
The update stored procedure is very simple: update table1 set fld1=
@fld1,fld2=fld2 where id=@id.
before calling gridview_rowupdating, I'd like to check whether the record
was modified by someonelse. I am thinking of calling simple select
statement: select id from table1 where id= @id and lastwritedatetime =
@lastwritedatetime
Questions: How can I know which row the user is editing from gridview or
from sqldatasource, in the grid view, I did not include coulmns id and
lastwritedatetime as these columns are not relevant to users.
TIA
Peter