PRB: Resolving FoxPro "Sharing Violation Reading Drive" Error

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

SYMPTOMS

A Microsoft FoxPro operation fails and displays the "Sharing violation reading drive <X>" error message, where <X> is the drive letter of a network drive.

RESOLUTION

The following are troubleshooting steps for this error:

  - Verify that each user has a FOXUSER.DBF file.

  - Verify that the CONFIG.FP file on the server includes the
    EXCLUSIVE=OFF statement. If EXCLUSIVE=OFF is used, it
    is possible to share database files.

  • Verify that the CONFIG.FP file on the server includes the RESOURCE=OFF statement, or that each user's FOXUSER.DBF and FOXUSER.FPT files are marked as read-only.

    NOTE: If the statements listed above are not set correctly, a "Cannot write to a read only file" error message may be displayed.

    - If you are using the LAN version of FoxPro 2.0 , verify

        that the FOXPROL.EXE, FOXPROLX.EXE, and FOXR.EXE files are
        marked as read-only. If you are using FoxPro 2.5 for
        MS-DOS, verify that the FOXPRO.EXE, FOXPROX.EXE, and FOXR.EXE files
        are marked as read-only.
    
  • If you use the Distribution Kit to create a standalone application, verify that the .EXE files are marked as read-only.
  • If you create compact executable files, mark the .ESL and .ESO files as read-only.
  • In some cases, the SHARE utility must be loaded on the server and on each workstation. Specify the /F and /L parameters as follows:

          SHARE /F:5120 /L:500
    
  • Verify that more than one workstation isn't attempting to write to the same filename in the same location on the network. For example, this could occur if two workstations issue the command "SELECT * FROM customer INTO TABLE n:\public\test.dbf" (without the quotation marks) at the same time, where the path "N:\PUBLIC" points to the same network directory.


  • Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a 2.60 2.60a errmsg
    err msg net
    KBCategory: kbnetwork kbenv kbtshoot kberrmsg kbprb
    KBSubcategory: FxenvFoxuser


    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.