ACC: Locking First Record Also Locks Last Record (109347)



The information in this article applies to:

  • Microsoft Access 1.0
  • Microsoft Access 1.1
  • Microsoft Access 2.0

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

SYMPTOMS

If you set the Default Record Locking option to Edited Record in the Multiuser category of the Options dialog box, editing the first record may lock both the first and the last record in the table.

CAUSE

Some data from the first record may be stored in the last data page in the table. The entire data page is locked, which locks both the first and the last record.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior


  1. Start Microsoft Access on two different computers and open the sample database NWIND.MDB.
  2. On both computers, choose Options from the View menu.
  3. On both computers, select Multiuser from the Category box.
  4. On both computers, select Edited Record in the Default Record Locking box.
  5. On one of the computers, open the Customers table. Edit the first record by adding enough characters to each field so that each field is the maximum allowed length. This will force Microsoft Access to store the data on the last data page.
  6. On the other computer, open the Customers table, move to the last record, and try to edit the record.
Note that compacting your database periodically will keep the data in order on the data pages, which should help prevent this behavior from occurring.

Note also that if all the records in a table are locked when you choose the Edited Record option it means that all the records fit on one data page, and therefore if any record is locked, then all the records are locked.

Modification Type:MajorLast Reviewed:5/6/2003
Keywords:kbfix kbprb kbusage KB109347