PRB: "Record Not Locked" with BROWSE NOEDIT or NOMODIFY

Last reviewed: June 27, 1995
Article ID: Q104048
The information in this article applies to:
  • Microsoft FoxPro for Windows, versions 2.5, 2.5a, 2.5b, 2.6
  • Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, 2.5a, 2.5b, 2.6

SYMPTOMS

Issuing a BROWSE command with the NOEDIT or the NOMODIFY clause with a shared database while you are setting the delete tag of any record except the current record produces the error message "Record not locked."

CAUSE

The record tagged for deletion does not match the current record pointer; as a result, the desired record cannot be locked prior to being flagged for deletion.

RESOLUTION

To correct the problem, issue an ON ERROR routine to trap the message prior to issuing the USE <database> SHARED and BROWSE commands. This routine will allow the tagged record to be selected even when it is not the current record.

   CLEAR
   ON ERROR DO errhand WITH ERROR( ), MESSAGE( )
   *** Errhand ***
   PROCEDURE errhand
   PARAMETER errnum,message
   If Errnum = 130
      On Error *
   Endif
   RETURN

MORE INFORMATION

Steps to Reproduce Problem

  1. Issue the following commands:

          USE <database> SHARED
    
          BROWSE NOEDIT    && or BROWSE NOMODIFY
    
    

  2. Click the delete tag of any record except the current record.

The message "Record not locked" appears. When the message is cleared, the record that was unsuccessfully flagged is now the current record and can be deleted.


Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a errmsg err msg
2.50b
2.60
KBCategory: kbprg kberrmsg kbprb
KBSubcategory: FxprgBrowse


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: June 27, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.