Click or drag to resize

DbRecall Function

Restore the current record if it has been marked for deletion.

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

Return Value

Type: Boolean
TRUE if successful; otherwise, FALSE.
Remarks
By default, this function operates on the currently selected work area.  It can be made to operate on an unselected work area by specifying it within an aliased expression. DBRecall() performs the same function as the RECALL command.  For more information, refer to the DELETE and RECALL commands.
Tip Tip
Logical records: Reinstating a deleted record affects the record's logical visibility if SetDeleted() is TRUE.  For more information, refer to the DBDelete() function and the DELETE and RECALL commands. Shared mode: For a shared database, DBRecall() requires the current record to be locked.  For more information, refer to "Concurrency Control" in the Programmer's Guide.
Examples
The following example recalls a record if it is deleted and attempts to lock the record if successful:
X#
cLast := "Winston"
DBUseArea(TRUE, "DBFNTX", "sales", "Sales", TRUE)
Sales->DBSetIndex("LastName")
IF Sales->DBSeek(cLast)
        IF Sales->Deleted()
                IF Sales->RLock()
                        Sales->DBRecall()
                        QOut("Record recalled")
                ELSE
                        QOut("Unable to lock record...")
                ENDIF
        ENDIF
ELSE
        QOut("Not found")
ENDIF
See Also