[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
 DBUNLOCK()
 Release all locks for the current work area
------------------------------------------------------------------------------
 Syntax
     DBUNLOCK() --> NIL
 Returns
     DBUNLOCK() always returns NIL.
 Description
     DBUNLOCK() releases any record or file locks obtained by the current
     process for the current work area.  DBUNLOCK() is only meaningful on a
     shared database in a network environment.
     DBUNLOCK() performs the same function as the standard UNLOCK command.
     For more information, refer to the UNLOCK command.
 Notes
     .  Network environment: Releasing locks may cause updates to the
        database to become visible to other processes.  For more information,
        refer to the "Network Programming" chapter in the Programming and
        Utilities Guide.
 Examples
     .  The following example illustrates a basic use of the
        DBUNLOCK() function:
        cLast := "Winston"
        USE Sales SHARED NEW VIA "DBFNTX"
        DBSETINDEX( "LASTNAME" )
        //
        IF ( Sales->(DBSEEK(cLast)) )
           IF Sales->( RLOCK() )
              Sales->( DBDELETE() )
              ? "Record deleted: ", Sales( DELETED() )
              Sales->( DBUNLOCK() )
           ELSE
              ? "Unable to lock record..."
           ENDIF
        ELSE
           ? "Not found"
        ENDIF
 Files   Library is CLIPPER.LIB.
See Also:
DBUNLOCKALL()
FLOCK()
RLOCK()
UNLOCK
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson