[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 SETSHARE()
 Sets the default opening mode (share mode) for CA-Clipper Tools file
 functions
------------------------------------------------------------------------------
 Syntax

     SETSHARE(<nShareMode>) --> lAccepted

 Argument

     <nShareMode>  Designates the desired share mode.

 Returns

     SETSHARE() returns .T. when the desired share mode is implemented (must
     be DOS version - 3.1 or higher).

 Description

     The setting you implement here influences all CA-Clipper Tools functions
     that open, read, or write to a file.  The share mode can be set here.
     It determines when a program opens a file under DOS and how other
     programs within a network may address this file.  The CA-Clipper Tools
     default is 0, compatibility mode.  The following codes apply:

     Table 7-23: Share Mode Coding
     ------------------------------------------------------------------------
     Code    Share Mode
     ------------------------------------------------------------------------
     0       Compatibility mode.  Here DOS or the network software itself
             determines the share mode.  In Novell networks, the SHAREABLE
             attribute plays an important role in this relationship.
     1       Both read and write by other programs are locked out.
     2       Write by other programs are locked out.
     3       Read by other programs are locked out.
     4       Not locked.  Read and write by other programs is allowed
     ------------------------------------------------------------------------

 Note

     Important!  This function can only be used with DOS versions 3.1 or
     higher.  Older versions return .F..

 Examples

     .  Change share mode, prohibit writing by others:

        ? SETSHARE(2)          // .T., when >= DOS 3.1

     .  Bad parameter:

        ? SETSHARE(12)         // .F.


See Also: GETSHARE()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson