ACC: Locking First Record Also Locks Last Record

Last reviewed: May 28, 1997
Article ID: Q109347
The information in this article applies to:
  • Microsoft Access versions 1.0, 1.1, 2.0

SYMPTOMS

Moderate: Requires basic macro, coding, and interoperability skills.

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.


Keywords : GnlMu kbusage
Version : 1.0 1.1 2.0
Platform : WINDOWS
Hardware : X86
Issue type : kbprb
Resolution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 28, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.