Click or drag to resize

DbRUnLock Function

X#
Release all or specified record locks.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax
 FUNCTION DbRUnLock(
	uRecID
) AS LOGIC CLIPPER
Request Example View Source

Parameters

uRecID (Optional)
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: Logic
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#
1PROCEDURE dbRUnLockRange(nLo AS SHORTINT, nHi AS SHORTINT)
2    LOCAL nCounter
3    // UnLock the records in the range from nLo to nHi
4    FOR nCounter := nLo UPTO nHi
5        DBRUnLock(nCounter)
6    NEXT
7    RETURN
See Also