Failed Update Attempts That Aren t Considered Conflicts

[Previous] [Next]

There are plenty of times when an update attempt fails for reasons other than optimistic updating conflicts. A database that preserves referential integrity might reject a user's attempt to delete a record from the Customers table for a customer who has open orders. An error will also occur if the user tries to place more data into a field than the database can store. The user could also violate a field constraint in the database by trying to set a customer's balance due to a negative number.

The ADO Cursor Engine doesn't consider these types of failed updates to be conflicts. Your best bet is to anticipate which changes your users might request that would fail because of such problems, and then develop error-handling code that can detect and resolve such problems appropriately.



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