Microsoft KB Archive/137971

{|
 * width="100%"|

BUG: Locking While Running Two Transactions on Two Sessions

 * }

Q137971

-

The information in this article applies to:


 * Microsoft Open Database Connectivity, version 2.0
 * Microsoft Access 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):

 FullConnect to 1st Access datasource. FullConnect to 2nd Access datasource. Set SQLSetConnectOption to AUTOCOMMITOFF on the 1st connection. Set SQLSetConnectOption to AUTOCOMMITOFF on the 2nd connection. SQLExecDirect on 1st connection (datasource1)

Select * from tablex(datasource 1) where Field1 = Value1 and Field2 IN (Value2) GetDataAll (datasource 1)  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 query words: 2.00.2317 locking transactions connectivity

Keywords : kbBug

Issue type : kbbug

Technology :