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.6
Syntax
 FUNCTION VoDbRecall() AS LOGIC
Request Example 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#
 1LOCAL rddList       AS _RDDLIST
 2...
 3aRdds := {"CAVODBF", "DBFNTX"}
 4n       := ALen(aRdds)
 5rddList := MemAlloc( (_SizeOf(DWORD)) + (n * _SizeOf(SYMBOL)) )
 6rddList.uiRddCount := n
 7FOR i := 1 TO n
 8    rddList.atomRddName[i] := SysAddAtomUpperA(aRdds[i])
 9NEXT
10cLast := "Winston"
11VODBUseArea(TRUE, rddList, "sales", "sales", TRUE, FALSE)
12VODBOrdListAdd("LastName", NIL, NIL)
13MemFree(rddList)
14IF (Sales->(VODBSeek(cLast)))
15    IF Sales->(VODBDeleted())
16        IF Sales->(RLock())
17            Sales->(VODBRecall())
18            ? "Record recalled"
19        ELSE
20            ? "Unable to lock record..."
21        ENDIF
22    ENDIF
23ELSE
24    ? "Not found"
25ENDIF
See Also