Where in the .NET System.Data namespace is the code that determines when the update command is executed, has the row in the SQL Server 2K table been changed after the client program read it, that is, the client-side version is "outdated"?
I would like to use a decompiler to look at the code and find out how it determines that a concurrency violation has occurred. I know this will have something to do with the timestamp column in the table and / or @@ rowcount, but I would like to see what happens when the update library executes the update command wrapped in a stored process.
The saved proc will have the following structure:
create proc foo_update
@id int,
@rowversion timestamp,
@val varchar(5)
as
begin
update foo set a = @val
where id = @id and mytimestampcolumn = @rowversion;
end
, - where, rowversion System.Data.DataRow , proc . SqlClient concurrency.