PRB: "Exclusive Open of File Is Required" Error in FoxPro

Last reviewed: April 29, 1996
Article ID: Q92346
The information in this article applies to:
  • Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, and 2.5a
  • Microsoft FoxPro for Windows, versions 2.5 and 2.5a

SYMPTOMS

An attempt to perform an action in Microsoft FoxPro fails with an "Exclusive open of file is required" error message.

CAUSE

The user attempted to run one of the following commands on a shared database (one that is not opened for exclusive access):

  • INDEX when creating, adding or deleting a compound index tag
  • INSERT [BLANK] (not SQL INSERT)
  • PACK
  • REINDEX
  • ZAP

RESOLUTION

Open the database for exclusive access, using one of the following statements:

   USE <database> EXCLUSIVE

   -or-

   SET EXCLUSIVE ON
   USE <database>

NOTE: This also occurs when attempting to perform a ZAP on a .DBF file that is not marked as Excluded in a project.

MORE INFORMATION

To use one of the commands above that requires the database to be opened for exclusive use, close the database, then issue the SET EXCLUSIVE ON command from the Command window. If the database is open, SET EXCLUSIVE ON causes another "Database not opened exclusively" error.

When a database is not opened for exclusive access, the MODIFY STRUCTURE command operates in read-only mode.

NOTE: If a table is added to a project, but not marked as excluded, then the table is opened in read-only mode when the .APP or .EXE built from the project is run.


Additional reference words: FoxDos FoxWin 2.00 multi-user programming 2.50
2.x
multiuser
KBCategory: kbprg kbprb
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 29, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.