xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

DbRLockList()

Returns a list of locked records.

Syntax

DbRLockList() --> aLockedRecords

Return

The function returns a one-dimensional array holding the record identifiers of locked records, or an empty array if no record is locked.

Description

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.

Info

See also:DbRLock(), DbRUnlock(), DbUnlock(), DbUnlockAll(), FLock(), RLock(), UNLOCK
Category: Database functions , Network functions
Source:rdd\dbcmd.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// 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

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe