Using /L Option on MS-DOS SHARE Command with FoxPro

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

The /L option on the MS-DOS SHARE command indicates the number of locks that can be placed on files. The /F parameter allocates file space (in bytes) for the MS-DOS storage area used to record file-sharing information.

The /L option specifies the maximum number of locks that can be used (the default is 20). Each time an application requests a portion of a file (such as a record in a database), a lock on only that portion of the file containing the desired information is issued. The locks remain in effect until the application program specifically removes them. Each lock requires that 7 bytes be reserved in memory. A /L setting of /L:500 may be sufficient for 1 to 10 users, but you should use /L:1000 for programs that frequently use multiple record locks. If the value used in the /L option is too low, a "File Access Denied" error can occur.

The default value for the /F option is 2048. A setting of 5100 is recommended. If the value used in the /F option is too low, a "File not Found" error can occur.


Additional reference words: VFoxWin 3.00 FoxDos FoxWin 2.00 2.50 2.50a
KBCategory: kbenv kbprg
KBSubcategory: FxenvMemory


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.