PRB: Table Always Opened as SHARED When Included in .EXE File

Last reviewed: June 27, 1995
Article ID: Q129957
The information in this article applies to:
  • Microsoft FoxPro for Windows, version 2.6a

SYMPTOMS

When a table that is included in an .EXE is opened, that table is opened as SHARED regardless of how EXCLUSIVE is set or whether the EXCLUSIVE keyword is used as a parameter in the USE command. In most cases, this should not be a concern because it is a read-only table by virtue of the fact that the table is part of a non-updateable file (the .EXE file).

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior

Create an executable that include the INVOICES table in the project and the following code as the MAIN program:

   SET EXCLUSIVE on
   SET STATUS BAR on

   SELECT 1
   USE c:\fpw26\tutorial\invoices EXCLUSIVE
   BROWSE NOWAIT
   WAIT WINDOW SYS(2011) TIMEOUT 2 && Should return "Record Unlocked"

   SELECT 2
   USE c:\fpw26\tutorial\customer
   BROWSE NOWAIT
   WAIT WINDOW SYS(2011) TIMEOUT 2 && Should return "Exclusive"

   inkey=INKEY(0)  && When a key is pressed, the program will
                   && terminate.

REFERENCES

For more information about exclusive use and read-only files, please see the following articles in the Microsoft Knowledge Base:

   ARTICLE-ID: Q92346
   TITLE     : "Exclusive Open of File Is Required" Error in FoxPro

   ARTICLE-ID: Q121056
   TITLE     : Items Included in Project Manager Are Read-Only


Additional reference words: FoxWin 2.60a
KBCategory: kbprg kbcode kbprb
KBSubcategory: FxprgGeneral


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.