ADO.NET synchronization/concurrency

  • Thread starter Thread starter jorge ribeiro
  • Start date Start date
J

jorge ribeiro

Hello

How can I insure that with an web app only one client
access in write mode to a record in a table?!?

My application scenario is the following: I've a web
project that makes all the data retriving from the client
and some client side validation. That web page often
retrives data from an web service that, in each function,
opens a database connection and gets the data, sending it
to the client right after closing the connection...

knowing that ADO.NET uses disconnected recordsets and with
this kind of develloping architecture how can I insure
concurrency to allow only on web client in write mode and
the others in reading mode until the resource is free?!?!

best regards

Jorge Ribeiro
 
Your database might have a sort of locking mechanism that migth be of help
to you. Have you tried using transactions with an isolation level of
Serializable? This works with SQL Server and in theory with any database
that supports row locking and transactions.
 
Back
Top