X
xenophon
In my .NET Framework 1.1 DataSet/DataTable/DataRow, I have a row with
a stringized GUID column called 'Concurrent'. There is a matching row
in the database with the same GUID. Within a single XA (MSDTC)
transaction (not SQL Server transaction), I need to "lock" the
existing row if the 'Concurrent' values match, update the database
table(s), change the 'Concurrent' value in the database and in the
DataRow, and then unlock at the database. That way, if two people
tried to save the same data, the second user would be blocked until
the first save was complete, and then could take action because
'Concurrent' would no longer match.
How can I lock a database row from an MSDTC transaction in C#? Is
there any good sample code for other means of concurrency management?
Thanks.
a stringized GUID column called 'Concurrent'. There is a matching row
in the database with the same GUID. Within a single XA (MSDTC)
transaction (not SQL Server transaction), I need to "lock" the
existing row if the 'Concurrent' values match, update the database
table(s), change the 'Concurrent' value in the database and in the
DataRow, and then unlock at the database. That way, if two people
tried to save the same data, the second user would be blocked until
the first save was complete, and then could take action because
'Concurrent' would no longer match.
How can I lock a database row from an MSDTC transaction in C#? Is
there any good sample code for other means of concurrency management?
Thanks.