Command SET EXCLUSIVE Foundation

Determines whether files are opened as SHARED or EXCLUSIVE by default.

Syntax
SET EXCLUSIVE on | OFF | <lToggle>
Scope
thread-local, current work space
Parameters
<lToggle>
<lToggle> is a logical expression which must appear in parentheses. Instead of the logical expression, the option ON can be specified for the value .T. (true) or OFF for the value .F. (false). When .T. or ON is specified, data files, index files and memo files opened with the command USE are opened in the exclusive mode by default and allow no multi-user access.
Description

The command SET EXCLUSIVE exists only for compatibility reasons and should no longer be used. Instead, the options SHARED or EXCLUSIVE should be explicitly specified in each call to the USE command.

Xbase++ defaults the initial value of SET EXCLUSIVE to .F. (false), meaning that files opened with the USE command are opened in the SHARED mode if the option SHARED or EXCLUSIVE is not specified. Multi-user access to files on the network is then allowed. Before any write operations, records must be locked using RLock() or DbRlock(), or the file must be locked using FLock().

When files are opened in the exclusive mode, no other workstation can access the files until they are closed using CLOSE and reopened with the SHARED option. In the exclusive mode, no file or record lock is required for write access. Files must be exclusively opened only in a few instances, such as the file operations performed by the commands PACK, ZAP and REINDEX.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.