Pessimistic locking

  • Thread starter Thread starter DaveP
  • Start date Start date
This is really kind of a loaded question since often it may be better to use
a timestamp (rowversion column) and often you can get better performance
with stored procs, but the basic pattern would be as follows:

Create a transaction with an IsolationLevel of RepeatableRead.
Set your DataAdapter’s SelectCommand property to use the transaction.
Make the changes to your data.
Set the DataAdapter’s Insert, Update, and Delete command properties to use
the transaction.
Call the DataAdapter’s Update method.
Commit the transaction.

HTH,
Peter
 

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

Similar Threads

Pessimistic locking 4
Ubound Forms 2
Find which user has record locked. 4
pessimistic locking 4
Implement ADO.NET Row Level Pessimistic Locking 1
pessimistic locking 3
dates 4
Locking set on BE or FE? 4

Back
Top