ACC2000: Replicas Encounter Record Editing Errors During Synchronization (264268)



The information in this article applies to:

  • Microsoft Access 2000

This article was previously published under Q264268
Moderate: Requires basic macro, coding, and interoperability skills.

This article applies only to a Microsoft Access database (.mdb).

SYMPTOMS

If you try to synchronize replicas while a replica within the set is editing a record, one of the following errors can occur, depending on which locking scheme is in place.


The following error occurs if Default Record Locking is set to Edited records and the Open databases using record-level locking check box is selected or not selected:
Synchronization between replica '<Drive>:\<Path>\<Replica1>.mdb' and replica '<Drive>:\<Path>\<Replica2>.mdb' failed.

Could not update; currently locked.
The following error occurs if Default Record Locking is set to All records and the Open databases using record-level locking check box is selected:
Synchronization between replica '<Drive>:\<Path>\<Replica1>.mdb' and replica '<Drive>:\<Path>\<Replica2>.mdb' failed.

You tried to lock table '|' while opening it, but the table cannot be locked because it is currently in use. Wait a moment, and then try the operation again.
The following error occurs if Default Record Locking is set to All records and the Open databases using record-level locking check box is not selected:
Synchronization between replica '<Drive>:\<Path>\<Replica1>.mdb' and '<Drive>:\<Path>\<Replica2>.mdb' failed.

Could not lock table '<tablename>'; currently in use by user '<username>' on machine '<machinename>'.

RESOLUTION

Make sure that the changes to records in each replica are saved before the synchronization begins, and that no further edits are attempted until the synchronization is finished.

MORE INFORMATION

To set a locking scheme, on the Tools menu, click Options. Click the Advanced tab, and then set the locking scheme to what you want it to be.

Steps to Reproduce the Behavior

CAUTION: If you follow the steps in this example, you modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file and follow these steps on a copy of the database.

  1. Open the sample database Northwind.mdb.
  2. On the Tools menu, click Options, click the Advanced tab, and set one of the locking schemes described in the "Symptoms" section of this article.
  3. On the Tools menu, point to Replication, and then click Create Replica to convert the Northwind database to a Design Master. Then, create a replica.
  4. In the Design Master, open the Customers table, and modify the ContactName field for CustomerID ALFKI. For example, change the name Maria to Mary.
  5. Close the Customers table, open a second instance of Access, and in this second instance open the replica that you created with the Design Master.
  6. Open the Customers table, begin editing the same ALFKI record, but do not commit the changes.
  7. Switch back to the first instance of Access, and then on the Tools menu, point to Replication, click Synchronize Now, select the option Directly with Replica, and then click OK.
  8. Click Yes when you are prompted to close the database prior to synchronization, and then click OK. Note that you receive one of the error messages mentioned in the "Symptoms" section of this article.

Modification Type:MajorLast Reviewed:6/29/2004
Keywords:kbnofix kbprb KB264268