C5_DBUNLOCKALL

 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



One response to “C5_DBUNLOCKALL

  1. Pingback: C5_UNLOCK | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.