xHarbour Reference Documentation > Function Reference |
Returns a list of locked records.
DbRLockList() --> aLockedRecords
The function returns a one-dimensional array holding the record identifiers of locked records, or an empty array if no record is locked.
The function is used to determine which and how many records are currently locked for shared access. It operates in the current work area unless used in an aliased expression.
See also: | DbRLock(), DbRUnlock(), DbUnlock(), DbUnlockAll(), FLock(), RLock(), UNLOCK |
Category: | Database functions , Network functions |
Source: | rdd\dbcmd.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// Theexample deonstrates the return value of DbRLockList() PROCEDURE Main() LOCAL aList, n USE Customer NEW ? LastRec() // result: 225 DbGoto(10) ? DbRLock( Recno() ) // result: .T. DbGoto( 180 ) ? DbRLock( Recno() ) // result: .T. aList := DbRLockList() ? Len(aList) // result: 2 FOR n:=1 TO Len( aList ) ?? aList[n] // result: 10 180 NEXT USE RETURN
http://www.xHarbour.com