xHarbour Reference Documentation > Function Reference |
Applies a file lock to an open, shared database.
NetFileLock( [<nSeconds>] ) --> lSuccess
The function returns .T. (true) when the current database file is successfully locked, otherwise .F. (false) is returned.
NetFileLock() is a network function used to obtain a lock on the database file open in shared mode for multi-user access. If the database file cannot be locked due to the file being used by another process, the function retries the operation for a maximum of <nSeconds> seconds and prompts the user if the operation should be retried or aborted.
The function uses FLock() and implements additional default logic for database locking in a network when the database cannot be locked at the moment. Refer to FLock() for more information on locking a database file.
Note: call function DbUnlock() to release the file lock after data is written to the database file.
See also: | DbRLock(), DbUnlock(), DbUnlockAll(), DbUseArea(), FLock(), RLock(), SET EXCLUSIVE, UNLOCK, USE |
Category: | Database functions , Network functions , xHarbour extensions |
Source: | rtl\ttable.prg |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
http://www.xHarbour.com