The information in this article applies to:
SUMMARYThis article discusses how the Microsoft Access ODBC driver implements the SQL UPDATE statement and the implications of this in a concurrent multi- user situation. MORE INFORMATION
The Microsoft Access ODBC driver relies on the Jet engine for data
processing. Jet is Microsoft's relational database engine that handles the
database processing for Microsoft Access and Microsoft Visual Basic.
Update <table name> Set <column values> Where <searchcondition>Even though this is a single SQL statement, it is implemented in roughly two steps:
If both processors do step 1 at the same time and processor #1 completes (finishes and releases the lock) the update before processor #2 attempts the update, processor #1's update will be lost. No error will be generated. This is a classic lost update problem without transactions. Transactions can help. A transaction ensures that the write lock obtained by the first processor is held, which would mean that the second processor would notice the lock. However, through the Jet driver, there is no way to ensure that at any given time some other processor is not in the step 1 phase of the update. Hence, even with transactions, a lost update might occur in a multi-machine update scenario. The same reasoning applies to the combination of the DELETE and UPDATE statements in a multi-user situation. You should note that this problem is encountered very rarely. Also, using the SQLSetPos, an ODBC API call, to do the UPDATEs or DELETEs is faster and minimizes the chance of any lost updates or deletes. Additional query words: 2.00.2317 concurrency locking VISUAL C++
Keywords : |
Last Reviewed: December 28, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |