Click or drag to resize

VoDbUnlock Function

X#
Release all locks for a work area.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax
 FUNCTION VoDbUnlock(
	uRecId AS USUAL
) AS LOGIC
Request Example View Source

Parameters

uRecId
Type: Usual

Return Value

Type: Logic
TRUE if successful; otherwise, FALSE.
Remarks
VODBUnLock() is the same as DBUnLock().
This function, however, does not call the error handler and will not, therefore, produce a runtime error message or create an error object if it fails. Thus, it may be important to check the return value to determine if the function succeeded.
the LastRddError property in the runtime state. will contain needed information regarding any error that occurs.
See DbUnLock() for more information.
Remarks
This function is like DBUnlock().

This function, however, does not call the error handler and will therefore not produce a runtime error message or create an error object if it fails.
Therefore it is important to check the return value to determine if the function succeeded.

The LastRddError property in the runtimestate will contain needed information about any error that occurs.


Tip Tip
The difference between VoDbUnlock and CoreDb.UnLock is that VoDbUnlock takes USUAL parameters
Examples
The following example illustrates a basic use of the VODBUnLock() function:
X#
 1cLast := "Winston"
 2USE sales SHARED NEW VIA "DBFNTX"
 3VODBOrdListAdd("Lastname", NIL, NIL)
 4IF (Sales->(VODBSeek(cLast)))
 5    IF Sales->(VODBRLock(NIL))
 6        Sales->(VODBDelete())
 7        ? "Record deleted: ", sales;
 8            (VODBDeleted())
 9        Sales->(VODBUnLock(NIL))
10    ELSE
11        ? "Unable to lock record..."
12    ENDIF
13ELSE
14    ? "Not found"
15ENDIF
See Also