Optimistic Versus Pessimistic Locking and the DataSet

Transactions help preserve database consistency. When you move money from your savings to your checking account to pay your phone bill, transaction processing ensures that the credit and withdrawal will both happen, or neither will happen. You will not wind up with a situation where the money goes into your checking account but is not withdrawn from the savings (good for you, but bad for the bank) or the reverse (bad for you, but good for the bank). Nothing about that transaction prevents your spouse from using that same money to eat out at a fancy restaurant.[6]

[6] The failure to distinguish between these two leads to the apparently common problem (as related to me by a bank vice president) ...

Get Application Development Using Visual Basic® and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.