BUG: CreateDynaset Holds Lock on Index if No Records ReturnLast reviewed: June 28, 1996Article ID: Q153018 |
The information in this article applies to:
SYMPTOMSAfter opening a Dynaset that contains no records with a SQL statement that refers to an indexed field, attempting to access that table from another application can cause the error:
"Couldn't save; currently locked by user Foo on machine Bar" CAUSEThe error occurs because the Jet engine is not, by default, releasing the lock on the index page after opening the Recordset. This behavior only occurs when the Recordset returned contains no records. It occurs with Jet 2.5 and Jet 3.0, but doesn't occur with Jet 1.1.
WORKAROUNDTo work around this problem, add a call to the Idle method of the DBEngine object immediately after the call to OpenRecordset. Add the following line of code:
DBEngine.Idle dbFreeLocks STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATION
Steps To Reproduce Problem
|
Additional reference words: 4.00 vb4win vb4all
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |