Dealing with Optimistic Update Conflicts

[Previous] [Next]

Chances are that multiple users will be running your application simultaneously. It's possible that more than one user will want to modify the same record of data in your database at the same time. To deal with this situation, most developers employ an optimistic updating scheme rather than a pessimistic updating scheme.

Optimistic updating greatly decreases the likelihood that data your users are trying to access is locked. The drawback to using optimistic updating is that you generally need to write a lot of code to handle the cases in which a user's updates to a record fail because another user changed the same record.

The ADO Cursor Engine helps simplify the process of handling these situations. ADO notifies you of such conflicts and provides several ways for you to determine why the update failed so that you can take the appropriate action. In Chapter 12, we'll discuss detecting and handling conflicts in greater detail.



Programming ADO
Programming MicrosoftВ® ADO.NET 2.0 Core Reference
ISBN: B002ECEFQM
EAN: N/A
Year: 2000
Pages: 131
Authors: David Sceppa

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net