VoDbUnlock Function | |
Release all locks for a work area.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.21
Syntax FUNCTION VoDbUnlock(
uRecId AS USUAL
) AS LOGIC
public static bool VoDbUnlock(
Usual uRecId
)
Request Example
View SourceParameters
- 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 global structure, StrucErrInfo, 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 |
---|
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:
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