Click or drag to resize

DbRUnLock Function

Release all or specified record locks.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.08
Syntax
 FUNCTION DbRUnLock(
	 uRecID AS USUAL
) AS LOGIC
View Source

Parameters

uRecID
Type: Usual
A unique value guaranteed by the structure of the data file to reference a specific item in a data source (database).  In a database file, <uRecID> is the record number.  In other data formats, <uRecID> is the unique primary key value.

Return Value

Type: Boolean
TRUE if successful; otherwise, FALSE.
Remarks
DBRUnlock() releases the lock on <uRecID> and removes it from the lock list.  If <uRecID> is not specified, all record locks are released.
Examples
The following example unlocks a range of records:
X#
PROCEDURE dbRUnlockRange(nLo AS SHORTINT, nHi AS SHORTINT)
        LOCAL nCounter
        // Unlock the records in the range from nLo to nHi
        FOR nCounter := nLo UPTO nHi
                DBRUnlock(nCounter)
        NEXT
        RETURN
See Also