ACC1x: "Can't Update; Currently Locked" Attaching FoxPro Table
ID: Q109709
|
The information in this article applies to:
-
Microsoft Access versions 1.0, 1.1
SYMPTOMS
You receive the error message "Couldn't update; currently locked" when you
attach or view a previously attached FoxPro table that another user has
open and is running an append or update operation on.
CAUSE
This error occurs because FoxPro temporarily locks the table and indexes
when a user is performing an append or update operation. The locks are
released as soon as the operation is complete.
RESOLUTION
Wait for the append or update operation to be completed, and then attach or
view the FoxPro table again.
STATUS
This problem no longer occurs in Microsoft Access version 2.0.
MORE INFORMATION
Steps to Reproduce Behavior
- Start Microsoft Access and open any database.
- Attach a FoxPro table located on a shared network drive.
- Start an append or update query on the attached table. The operation
will need to take long enough to complete the rest of these steps.
- Start another instance of Microsoft Access on a second computer.
- On the second computer, attach the same FoxPro table you attached in
step 2. Note that you receive the error message stated above.
NOTE: The following sample code can be used in place of the append or
update query in step 3 to keep the first computer busy with the FoxPro
table:
Sub test ()
Dim db As Database
Dim ds As Dynaset
Set db = CurrentDB()
'Query1 is based on the attached FoxPro table and has no criteria.
Set ds = db.CreateDynaset("Query1")
ds.MoveFirst
While Not ds.eof
ds.Edit
ds!Author = "FOX"
ds.Update
ds.MoveNext
Debug.Print ".";
DoEvents
Wend
ds.Close
db.Close
End Sub
Keywords : kb3rdparty IsmXbase
Version : 1.0 1.1
Platform : WINDOWS
Issue type : kbprb