UNLOCK Command

Releases a record lock, multiple record locks, or a file lock from a table, or releases all record and file locks from all open tables.

UNLOCK    [RECORD nRecordNumber]   [IN nWorkArea | cTableAlias]   [ALL]

Parameters

RECORD nRecordNumber

Releases the record lock on record number nRecordNumber. You can specify 0 for nRecordNumber to unlock a table header locked with LOCK("0", <alias>) or RLOCK("0", <alias>).

Issuing UNLOCK RECORD nRecordNumber for a record in a table with a file lock releases the file lock.

IN nWorkArea | cTableAlias

Releases a record lock (or locks) or a file lock from a table in a specific work area. nWorkArea specifies a work area number and cTableAlias specifies a table alias. If you don't include nWorkArea or cTableAlias, UNLOCK releases a record lock (or locks) or a file lock from the table in the currently selected work area.

ALL

Releases all record and file locks in all work areas.

For more information about record and file locking and sharing tables on a network, see Programming for Shared Access.

Expand imageRemarks

Expand imageExample

Expand imageSee Also


© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic