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>unlock</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 UNLOCK
 Release file/record locks set by the current user
------------------------------------------------------------------------------
 Syntax

     UNLOCK [ALL]

 Arguments

     ALL releases all current locks in all work areas.  If not specified,
     only the lock in the current work area is released.

 Description

     UNLOCK is a network command that releases file or record locks set by
     the current user.  Use it when you want to release the current lock
     without setting a new lock.  Both FLOCK() and RLOCK() release the
     current lock before setting a new one.

     After an UNLOCK, an update to a shared database file and associated
     index and memo files becomes visible to DOS and other applications but
     is not guaranteed to appear on disk until you perform a COMMIT or close
     the file.

     Refer to the Network Programming chapter in the Programming and
     Utilities guide for more information on the principles of locking and
     update visibility.

 Notes

     .  SET RELATION: UNLOCK does not automatically release a record
        lock along a RELATION chain unless you UNLOCK ALL.

 Examples

     .  This example attempts an update operation that requires a
        record lock.  If the RLOCK() is successful, the record is updated
        with a user-defined function and the RLOCK() is released with UNLOCK:

        USE Sales INDEX Salesman SHARED NEW
        IF RLOCK()
           UpdateRecord()
           UNLOCK
        ELSE
           ? "Record update failed"
           BREAK
        ENDIF

 Files:  Library is CLIPPER.LIB.

See Also: FLOCK() RLOCK() SET RELATION USE DBUNLOCK()

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