Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Advantage CA-Clipper Guide v5.5 - ax_getlocks() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 AX_GetLocks()
 Fill an array with locked record numbers
------------------------------------------------------------------------------

 Syntax

     AX_GetLocks() -> array

 Returns

     Returns an array of record numbers for those records that are locked by
     the current user.  If no records are locked, an empty array is returned.

 Description

     This function determines all explicit and implicit record locks set by
     the user in the current work area.  The record numbers of the locked
     records are placed into an array.  This function is helpful in
     verifying record locks that are set before changes are made to the
     record.

 Example

     LOCAL aRec := {5, 20, 57, 100, 324}  // Array of records to lock
     LOCAL nCount

     USE test VIA "DBFNTXAX"              // Open TEST.DBF
     AX_RLock( aRec )                     // Lock all five records

     //...( Do some stuff with those five records )...

     // Make sure they are all locked
     aRec := AX_GetLocks()                // Get array of locked records

     FOR nCount := 1 TO Len(aRec)         // Cycle through array
        ? aRec[ nCount ]                  // displaying each record number:
     NEXT                                 // 5, 20, 57, 100, 324


See Also: AX_UnLock() AX_RLock() AX_IsLocked()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson