Click or drag to resize

VoDbRecall Function

Restore the current record if it is marked for deletion.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.10
Syntax
 FUNCTION VoDbRecall() AS LOGIC
View Source

Return Value

Type: Boolean
TRUE if successful; otherwise, FALSE.
Remarks
VODBRecall() is the same as DBRecall().  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 DBRecall() for more information.
Examples
The following example recalls a record if it is deleted and attempts to lock the record if successful:
X#
LOCAL rddList       AS _RDDLIST
...
aRdds := {"CAVODBF", "DBFNTX"}
n       := ALen(aRdds)
rddList := MemAlloc( (_SizeOf(DWORD)) + (n * _SizeOf(SYMBOL)) )
rddList.uiRddCount := n
FOR i := 1 TO n
        rddList.atomRddName[i] := SysAddAtomUpperA(aRdds[i])
NEXT
cLast := "Winston"
VODBUseArea(TRUE, rddList, "sales", "sales", TRUE, FALSE)
VODBOrdListAdd("LastName", NIL, NIL)
MemFree(rddList)
IF (Sales->(VODBSeek(cLast)))
        IF Sales->(VODBDeleted())
                IF Sales->(RLock())
                        Sales->(VODBRecall())
                        ? "Record recalled"
                ELSE
                        ? "Unable to lock record..."
                ENDIF
        ENDIF
ELSE
        ? "Not found"
ENDIF
See Also