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

ID: Q124865

2.60a   | 2.60a
WINDOWS | MS-DOS

The information in this article applies to:

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: KBSubcategory: FxprgMultiuser

Keywords          : kberrmsg FxprgMultiuser 
Version           : 2.60a | 2.60a
Platform          : MS-DOS WINDOWS

Last Reviewed: May 22, 1998