VoDbRecall Function | |
Restore the current record if it is marked for deletion.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax 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 LastRddError property in the runtime state. 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:
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