xHarbour Reference Documentation > Command Reference xHarbour Developers Network  

SET EXCLUSIVE

Sets the global EXCLUSIVE open mode for databases.

Syntax

SET EXCLUSIVE ON | off | ( <lOnOff> )

Arguments

ON | off | ( <lOnOff> )
This option toggles whether databases are opened in EXCLUSIVE mode or not. The default is ON or .T. (true), i.e. all databases opened with the USE command are exclusively accessible for the xHarbour application only. To change the setting use OFF or .F. (false) as parameter. The parameter can also be specified as a logical expression enclosed in parentheses.

Description

The SET EXCLUSIVE command changes the global setting for the default open mode with the USE command for databases. The default setting is ON. This setting is valid for all work areas and can be overriden for inividual work areas by specifying the option EXCLUSIVE or SHARED with the USE command.

Opening a database in EXCLUSIVE mode reserves access to this database to the xHarbour application that opened the database. Other applications in a network environment are denied access as long as the database is open for exclusive use. It is, therefore, recommended to use databases in SHARED mode, unless a database operation must be performed that requires exclusive access. This is necessary for PACK, REINDEX and ZAP operations.

Databases opened for exclusive use do not require record or file locks for changing data. This is required when a database is open in SHARED mode.

Info

See also:FLock(), Neterr(), RLock(), Set(), UNLOCK, USE
Category: Database commands , SET commands
Source:rtl\set.c
LIB:xhb.lib
DLL:xhbdll.dll


Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe