Microsoft KB Archive/129957

{| = PRB: Table Always Opened as SHARED When Included in .EXE File =
 * width="100%"|

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.

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.