VoDbUnLockAll Function | |
Release all locks for all work areas.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax FUNCTION VoDbUnLockAll() AS LOGIC
public static bool VoDbUnLockAll()
Request Example
View SourceReturn Value
Type:
Logic
TRUE if successful; otherwise, FALSE.
Remarks
VODbUnLockAll() is the same as DbUnLockAll().
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
DbUnLockAll for more information.
Examples
The following example marks a record for deletion if an VODBRLock() attempt is successful, then clears all locks in all work areas:
1cLast := "Winston"
2USE sales SHARED NEW VIA "DBFNTX"
3VODBOrdListAdd("Salefnam", NIL)
4VODBOrdListAdd("Salelnam", NIL)
5USE colls SHARED NEW VIA "DBFNTX"
6VODBOrdListAdd("Collfnam", NIL)
7VODBOrdListAdd("Colllnam", NIL)
8DBSelectArea("sales")
9IF (colls->(VODBSeek(cLast)))
10 IF colls->(VODBDeleted())
11 ? "Record deleted: ", colls->;
12 (VODBDeleted())
13 IF colls->(VODBRLock(NIL))
14 colls->(VODBRecall())
15 ? "Record recalled..."
16 ENDIF
17 ENDIF
18ELSE
19 ? "Not found"
20 VODbUnLockAll()
21ENDIF
See Also