Condividi tramite


SET EXCLUSIVE Command

Specifies whether Visual FoxPro opens table files for exclusive or shared use on a network.

SET EXCLUSIVE ON | OFF

Parameters

  • ON
    (The default for the global data session.) Limits accessibility of a table opened on a network to the user who opened it. The table isn't accessible to other users on the network. Unlike FLOCK( ), SET EXCLUSIVE ON also prevents all other users from having read-only access. A file can also be opened on a network for exclusive use by including the EXCLUSIVE clause with the USE command. It isn't necessary to perform record or file locking on a table opened for exclusive use.

    Opening a table for exclusive use ensures that the file can't be changed by other users. For some commands, execution isn't possible until a table is opened for exclusive use. These commands are INSERT, INSERT BLANK, MODIFY STRUCTURE, PACK, REINDEX, and ZAP.

  • OFF
    (The default for a private data session.) Allows a table opened on a network to be shared and modified by any user on the network.

    For additional information about record and file locking and sharing tables on a network, see Programming for Shared Access.

Remarks

Changing the setting of SET EXCLUSIVE doesn't change the status of previously opened tables. For example, if a table is opened with SET EXCLUSIVE set to ON, and SET EXCLUSIVE is later changed to OFF, the table retains its exclusive-use status.

SET EXCLUSIVE is scoped to the current data session.

See Also

FLOCK( ) | RLOCK( ) | SET DATASESSION | USE