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_rlock():</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Sx_RLock():

  Syntax:   Sx_RLock([<nRecNo | aRecArray>])

            nRecNo    = Record number of a single record to lock
            aRecArray = Array of record numbers of records to lock

  Returns:  <logical> Indicates success or failure of single record lock.

            -or-

            <array> Array of logical values indicating success or failure
                    of record lock for corresponding records in aRecArray.

  Description:  Locks one or more records in a shared database without
                unlocking any other previously-locked records (as with
                Clipper's RLock() function).

  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:    If no parameters are passed then the current record is locked.

            Clipper's RLOCK() function automatically unlocks all previously
            locked records before locking the current record.  Since the
            Sx_RLock() function supports multiple-record locking, this
            function does not unlock any previously locked records.



See Also: Sx_GetLocks() Sx_IsLocked() Sx_UnLock() 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