Command UNLOCK Foundation
Releases file and or record locks.
UNLOCK [ALL]
UNLOCK [IN <nWorkArea> | <cAlias> ]
UNLOCK RECORD <xRecordId> [IN <nWorkArea> | <cAlias> ]
The command UNLOCK removes all existing record and file locks in the current work area or in the work area as specified using the IN clause. It is only significant when files are open in the SHARED mode. UNLOCK releases the locks without setting any new ones (as is done by the functions FLock() and RLock()).
The functions DbUnlock() and DbUnlockAll() are the functional equivalents of the command UNLOCK.
// In the example, a record is locked before being
// marked for deletion. When the record could be
// locked, the record lock is released after the deletion.
PROCEDURE Main
USE Customer ALIAS Cust NEW SHARED
GOTO 10
IF RLock()
DELETE
? "Record No 10 is deleted"
UNLOCK
ELSE
? "Record number 10 cannot be locked"
ENDIF
CLOSE Cust
RETURN
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.