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 v6.11 - ax_rlock() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 AX_RLock()
 Locks one or more records in a shared table
------------------------------------------------------------------------------

 Syntax

     AX_RLock( [<nRecNo> | <aRecArray>] ) -> logical

     <nRecNo> A numeric value representing the record number to lock.

     <aRecArray>  An array of numeric record numbers to lock.

 Returns

     Returns a logical value indicating success .T. or failure .F. of the
     record lock.

     - or -

     Returns an array of logical values indicating success .T. or failure
     .F. of each record lock for corresponding records in <aRecArray>.

 Description

     AX_RLock() locks one or more records, as specified by the parameter,
     in a shared table.

     If no parameters are passed, the current record is locked.

     While CA-Clipper's RLOCK() automatically unlocks all previously locked
     records before locking the current record, AX_RLock() will not unlock
     any previously locked records.

 Example

     USE test VIA "DBFCDXAX" SHARED

     // Lock records 2, 5, 7, 10
     AX_Rlock( { 2, 5, 7, 10 } )

     // Get locks and check with AX_IsLocked()
     aRecs := AX_GetLocks()

     FOR nCnt := 1 TO LEN( aRecs )
        ? AX_IsLocked( aRecs[nCnt] )       // Should print .T.
     NEXT


See Also: AX_GetLocks() AX_IsLocked() AX_UnLock()

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