Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- SIx Driver RDD v3.00 - Reference Guide - <b>sx_getlocks():</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Sx_GetLocks():

  Syntax:   Sx_GetLocks()

  Returns:  <array> Array of record numbers of record that are locked by
            the current user.

  Description:  Returns an array containing the record numbers of all
                currently locked records (locked by current user).

  Example:

    #include "SIXCDX.CH"

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

    USE test SHARED                        // Open TEST.DBF
    Sx_RLock( aRec )                       // Lock all five records

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

    // Make sure they're all locked
    aRec := Sx_GetLocks()                  // Get array of locked records
    FOR nCount := 1 TO Len( aRec )         // Cycle through array
      ? aRec[ nCount ]                     //  displaying each record number
    NEXT

    Sx_UnLock( 57 )                        // Unlock just record number 57
    Sx_RLock( 500 )                        // Lock record 500
    Sx_RLock( {75,80,90} )                 // Lock records 75, 80, and 90

    Sx_UnLock( {5,100,324} )               // Unlock records 5, 100, and 324
    UNLOCK                                 // Unlock all locked records


  Notes:    This functions returns only records that have been explicitly
            locked using Sx_RLock() or RLOCK().  Implicit record locks
            (i.e., records locked by dbAppend() ) are not included, as is
            the case with Clipper's dbRLockList() function.



See Also: Sx_UnLock() Sx_RLock() Sx_IsLocked() Why can't I lock more than 20 records at a time?

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