xHarbour Reference Documentation > Function Reference |
Locks the current record for write access.
NetRecLock( [<nSeconds>] ) --> lSuccess
The function returns .T. (true) when the current database record is successfully locked, otherwise .F. (false) is returned.
NetRecLock() is a network function used to obtain a lock on the current database record when the database file is open in shared mode for multi-user access. If the current database record cannot be locked due to the record being locked 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 DbRLock() and implements additional default logic for record locking in a network when the record cannot be locked at the moment. Refer to DbRLock() for more information on locking a database record.
Note: call function DbRUnlock(), DbUnlock() or DbUnlockAll() to release the record lock after data is written to the current record.
See also: | DbRLockList(), DbRUnlock(), DbUnlock(), DbUnlockAll(), NetFileLock(), RLock(), UNLOCK |
Category: | Database functions , Network functions , xHarbour extensions |
Source: | rtl\ttable.prg |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
http://www.xHarbour.com