ACC1x: "Can't Update; Currently Locked" Attaching FoxPro Table

ID: Q109709


The information in this article applies to:


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


  1. Start Microsoft Access and open any database.


  2. Attach a FoxPro table located on a shared network drive.


  3. 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.


  4. Start another instance of Microsoft Access on a second computer.


  5. 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 

Last Reviewed: March 30, 1999