?Optimistic Concurrency Control
I was just trying to get a clearer definition on how 'occ' worked in detail
I was just trying to get a clearer definition on how 'occ' worked in detail
1. User A fetches a row from the database.
2. User B fetches the same row from the database.
3. User B changes her row and submits a successful change to the row at the database.
4. User A modifies his row and attempts to update the row at the database. The Update fails, because the row is compaired to it's original vaules when User B selected the row. Since the compare fails, the database is not modified.
This explanation was plagerized from "Microsoft ADO.NET", ISBN 0-7356-1423-7, published in 2002 and authored David Sceppa.
A very good book, although it covers ADO.NET 1.0. Thanks go to David...
I found that Optimistic Concurrency does not work with an SQL Data Source. I was using a DetailView object and trying to do an update. I got no error, but the data was not updated. When I turned off Optimistic Concurrency the update worked as it should. My guess is that all the Old_... variables are not getting initialized or used correctly in the update statement.
On a somewhat related subject, is there any way to lock the table row while doing the edit?