Functions.DbUnLock Method (Long)
Release all locks for a work area.
XSharp.RT (in XSharp.RT.dll) Version: 2.16
Syntax Request Example
nRecord AS LONG
) AS LOGIC
public static bool DbUnLock(
- Type: Long
TRUE if successful; otherwise, FALSE.
DBUnLock() releases any record or file locks obtained by the current process for a work area. DBUnLock() is only meaningful on a shared database.
By default, this function operates on the currently selected work area.
It can be made to operate on an unselected work area by specifying
it within an aliased expression
Shared mode: Releasing locks can cause updates to the database to become visible to other processes.
The following example illustrates a basic use of the DBUnLock() function:
1cLast := "Winston"
2USE sales SHARED NEW VIA "DBFNTX"
5 IF Sales->RLock()
7 QOut("Record deleted: ", Sales->Deleted())
10 QOut("Unable to lock record...")
13 QOut("Not found")