PRB: CREATEOFFLINE Opens Parent Table Exclusively

Last reviewed: March 14, 1997
Article ID: Q165234
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, versions 5.0, 5.0a

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 “File Access is denied.”

Steps to Reproduce Behavior

  1. 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"
    
    

  2. 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
    

  3. In the Data Session window, select customer. Notice that the status bar shows that customer is opened exclusively.

  4. 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
    
    

REFERENCES

For more information about offline views, please see the following articles in the Microsoft Knowledge Base:

   ARTICLE-ID: Q156013
   TITLE     : Possible Uses for Offline Views in Visual FoxPro

   ARTICLE-ID: Q155528
   TITLE     : How To Set Up an Offline View in Visual FoxPro 5.0

   ARTICLE-ID: Q155820
   TITLE     : HOWTO: Refreshing an Offline View in Visual FoxPro 5.0

   ARTICLE-ID: Q156552
   TITLE     : How To Use Offline Views in Visual FoxPro


Additional reference words: create ofline off view multi-user
Keywords : FxtoolQueryvwdes vfoxwin kbprb
Version : 5.00 5.00a
Platform : WINDOWS
Issue type : kbprb


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: March 14, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.