Concurrency in ado.net

Oct 23 2005 5:29 AM

Hi,

I am working on a web application using .net. I am  using dataadapter.update method
to write the changes to the database.

Can anyone suggest me the best approach to apply the concurrency control while
updating the database. Whether the usage of pessimistic concurrency control or the
optimistic concurrency control is better in this situation..?
I know that while using the pessimistic approach,  database will be locked when the user reads the data for updating and will be unlocked only when the updation is done.
 
If your answer is optimistic then please tell me whether the default method in the dataadapter
configuration wizard or using the timestamp is better.

If possible please give sample code

Thanks

Naison Pekkattil