BUG: Locking While Running Two Transactions on Two Sessions

Last reviewed: September 9, 1996
Article ID: Q137971
The information in this article applies to:
  • Microsoft Open Database Connectivity, version 2.0
  • Microsoft Access, version 2.0

BUG# NT: 2344 Raid (QJET)

SYMPTOMS

When you run concurrent uncommitted transactions on two different Access databases (.MDB files) on two different connections with AUTOCOMMIT OFF, the second transaction produces an error:

   [Microsoft][ODBC Microsoft Access 2.0 Driver] Couldn't update; currently
   locked by another session on this machine.

The two connections are from the same application.

WORKAROUND

If SQLSetConnectOption AUTOCOMMIT is set to AUTOCOMMIT_ON, there is no locking. Because this problem does not occur with the 32-bit drivers, moving to 32-bit applications is recommended.

STATUS

Microsoft has confirmed this to be a problem in the Access 2.0 ODBC driver version 2.00.2317. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

To reproduce this problem using ODBC Test (16-bit):

  1. FullConnect to 1st Access datasource.

  2. FullConnect to 2nd Access datasource.

  3. Set SQLSetConnectOption to AUTOCOMMITOFF on the 1st connection.

  4. Set SQLSetConnectOption to AUTOCOMMITOFF on the 2nd connection.

  5. SQLExecDirect on 1st connection (datasource1)

    Select * from tablex(datasource 1) where Field1 = Value1 and Field2 IN (Value2)

  6. GetDataAll (datasource 1)

  7. SQLExecDirect on 2nd connection (datasource 2)

    Select * from tabley(datasource 2) where Field1 = Value1 and Field2 IN (Value2)

    The error occurs here:

         [Microsoft][ODBC Microsoft Access 2.0 Driver] Couldn't update;
         currently locked by another session on this machine.
    

This problem is not seen the in Access 2.00.2317 32-bit driver or the 3.00.2106 Access driver.


Additional reference words: 2.00.2317 locking transactions connectivity
KBCategory: kbprg kbinterop kbbug2.00.2317
KBSubcategory:



THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 9, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.