Click or drag to resize

VoDbUnLockAll Function

Release all locks for all work areas.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.6
Syntax
 FUNCTION VoDbUnLockAll() AS LOGIC
Request Example View Source

Return Value

Type: Boolean
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 global structure, StrucErrInfo, 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:
X#
 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")        // Select "sales" work area
 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()        // Remove all locks in
21ENDIF                            // all work areas
See Also