Microsoft KB Archive/165234

= PRB: CREATEOFFLINE Opens Parent Table Exclusively =

Article ID: 165234

Article Last Modified on 12/11/1999

-

APPLIES TO


 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q165234



SYMPTOMS
The CREATEOFFLINE command opens the parent table exclusively regardless of the exclusive setting.



RESOLUTION
If the parent table is not currently open, open the parent table shared before issuing the CREATEOFFLINE command.



STATUS
Microsoft is researching this behavior and will post new information here in the Microsoft Knowledge Base as it becomes available.



MORE INFORMATION
In a multiuser environment where more than one work station is accessing tables, CREATEOFFLINE will open a table exclusively regardless of the setting of exclusive, and other users will not be able to open that table. They will get the message [ASCII 147]File Access is denied.[ASCII 148]

Steps to Reproduce Behavior
  Run the following code to create a new subdirectory with a new database that contains a view of the customer table. SET DEFAULT TO HOME OPEN DATABASE HOME+"\samples\data\testdata" MKDIR offview SET DEFAULT TO HOME+"offview" CREATE DATABASE OFFDBC CREATE SQL VIEW mycustomer AS SELECT * ; FROM HOME+"\samples\data\customer"   Run the following code to make the view off line. CLOSE ALL CLEAR SET EXCLUSIVE OFF SET MULTILOCKS ON     OPEN DATABASE Home+"\samples\data\testdata" SET DEFAULT TO HOME+"offview" OPEN DATABASE offdbc ?CREATEOFFLINE("mycustomer") SET  In the Data Session window, select customer. Notice that the status bar shows that customer is opened exclusively.  Run the following code to put mycustomer back online. CLOSE ALL CLEAR SET EXCLUSIVE OFF SET MULTILOCKS ON     SET DEFAULT TO HOME+"offview" OPEN DATABASE offdbc IF DBGETPROP("mycustomer","view","offline") ?DROPOFFLINE("mycustomer") ENDIF 

