C5_DBUNLOCK

 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



One response to “C5_DBUNLOCK

  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.