Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.2 . The Guide To CA-Clippe - <b>dbunlockall()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 DBUNLOCKALL()
 Release all locks for all work areas
------------------------------------------------------------------------------
 Syntax

     DBUNLOCKALL() --> NIL

 Returns

     DBUNLOCKALL() always returns NIL.

 Description

     DBUNLOCKALL() releases any record or file locks obtained by the current
     process for any work area.  DBUNLOCKALL() is only meaningful on a shared
     database in a network environment.  It is equivalent to calling
     DBUNLOCK() on every occupied work area.

     DBUNLOCKALL() performs the same function as the UNLOCK ALL command.  For
     more information, refer to the UNLOCK ALL command.

 Examples

     .  The following example marks a record for deletion if an
        RLOCK() attempt is successful, then clears all locks in all work
        areas:

        cLast := "Winston"
        USE Sales SHARED NEW VIA "DBFNTX"
        DBSETINDEX( "SALEFNAM" )
        DBSETINDEX( "SALELNAM" )
        //
        USE Colls SHARED NEW VIA "DBFNTX"
        DBSETINDEX( "COLLFNAM" )
        DBSETINDEX( "COLLLNAM" )
        //
        DBSELECTAREA( "Sales" )     // select "Sales" work area
        //
        IF ( Colls->(DBSEEK(cLast)) )
           IF Colls->( DELETED() )
              ? "Record deleted: ", Colls->( DELETED() )
              IF Colls->( RLOCK() )
                 Colls->( DBRECALL() )
                 ? "Record recalled..."
              ENDIF
           ENDIF
        ELSE
           ? "Not found"
           DBUNLOCKALL()            // remove all locks in
        ENDIF                       // all work areas

 Files:  Library is CLIPPER.LIB.

See Also: DBUNLOCK() FLOCK() RLOCK() UNLOCK

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