-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: VaibhavModak
Message 2 in Discussion

Hi, What you are looking for is related to maintaining Concurrency Control in the 
database.   ADO.NET and Visual Studio .NET use optimistic concurrency, because the 
data architecture is based on disconnected data.   When an update is attempted, the 
original version of a changed row is compared against the existing row in the 
database. If the two are different, the update fails with a concurrency error. Now you 
have to add your own code according to your business logic requirement to catch the 
concurrency error while updating the database for more then one user . ADO.NET 
provides a DBConcurrencyException object that returns the row that violates the 
concurrency rules. The DataAdapter examines the number of rows affected by the 
execution of each insert, update, or delete operation, and throws this exception if 
the number equals zero. This is usually the result of a concurrency violation.   For 
more details about the types of concurrency control and VS.NET and ADO.NET approach in 
handling the Concurrency part refer to this link from MSDN:   Introduction to Data 
Concurrency in ADO.NET 
http://msdn.microsoft.com/library/en-us/vbcon/html/vbtskPerformingOptimisticConcurrencyChecking.asp?frame=true
   And there is an excellent walkthrough on Handling Concurrency Exception on MSDN 
Walkthrough: Handling a Concurrency Exception 
http://msdn.microsoft.com/library/en-us/vbcon/html/vbwlkHandlingConcurrencyException.asp?frame=true
     HTH,     Regards, Vaibhav Modak

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to