PRB: "Record is not locked" When Editing Multi-table Browse

Last reviewed: April 30, 1996
Article ID: Q124865
The information in this article applies to:
  • Microsoft FoxPro for Windows, version 2.6a
  • Microsoft FoxPro for MS-DOS, version 2.6a

SYMPTOMS

When editing the data in a Browse window using the BROWSE command with the FIELDS clause, where the fields come from more than one table, a dialog box appears containing the message:

   Record is not locked

CAUSE

One or more of the tables whose fields are included in the BROWSE is opened exclusively.

One cause of the "Record is not locked" message is attempting to edit any field of a multi-table BROWSE involving related tables when one of the tables is opened for exclusive use.

RESOLUTION

Do not open any of the tables exclusively, or edit the fields within the @ ... GET fields of a window defined by FoxPro's Screen Builder.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Set the default directory to the TUTORIAL directory provided with the product by typing the following in the Command window:

          SET DEFAULT TO SYS(2004)+ "tutorial"
    

  2. Create and run a program containing the following commands:

          CLOSE ALL
          USE detail EXCLUSIVE && Open the file exclusively
          INDEX ON pno TAG pno && If the tag already exists, reply YES
    
          CLOSE ALL            && Remove exclusive setting
          SET EXCLUSIVE OFF
          USE parts EXCLUSIVE  && EXCLUSIVE will cause the message
          USE detail IN 0 ORDER TAG pno
          SELECT parts
          SET RELATION TO pno INTO detail
          BROWSE FIELDS parts.pno, detail.price
    
    

  3. Move the insertion point to the PRICE field of any record and enter some new data, including two digits to the right of the decimal point.

The message "Record is not locked" appears. This happens on a single-user system and on a shared (network) system, with or without multi-locks being set on or off, and with or without the Detail table being opened in Shared mode.

This occurs because FoxPro assigns Exclusive status to the browsed data of all of the related tables when one of those tables is opened exclusively.


Additional reference words: 2.60a FoxWin FoxDos errmsg multiuser network
KBCategory: kbprg kbprg kberrmsg
KBSubcategory: FxprgMultiuser


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: April 30, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.