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.10
Syntax
 FUNCTION VoDbUnlockAll() AS LOGIC
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#
cLast := "Winston"
USE sales SHARED NEW VIA "DBFNTX"
VODBOrdListAdd("Salefnam", NIL)
VODBOrdListAdd("Salelnam", NIL)
USE colls SHARED NEW VIA "DBFNTX"
VODBOrdListAdd("Collfnam", NIL)
VODBOrdListAdd("Colllnam", NIL)
DBSelectArea("sales")                // Select "sales" work area
IF (colls->(VODBSeek(cLast)))
        IF colls->(VODBDeleted())
                ? "Record deleted: ", colls->;
                        (VODBDeleted())
                IF colls->(VODBRLock(NIL))
                        colls->(VODBRecall())
                        ? "Record recalled..."
                ENDIF
        ENDIF
ELSE
        ? "Not found"
        VODBUnlockAll()                // Remove all locks in
ENDIF                                                        // all work areas
See Also