Command RECALL Foundation

Removes the deletion flag for one or more records.

Syntax
RECALL    ;
  [FOR    <lForCondition>] ;
  [WHILE  <lWhileCondition>] ;
  [NEXT   <nCount>] ;
  [RECORD <xRecordID>] ;
  [REST]  ;
  [ALL]   ;
  [IN <nWorkArea> | <cAlias> ] ;
  [NOOPTIMIZE]
Parameters
<lForCondition>
<lForCondition> is an optional logical expression specifying a condition. The deletion flag is removed only for records where <lForCondition> returns the value .T. (true).
<lWhileCondition>
<lWhileCondition> is an optional logical expression specifying a condition. The deletion flag is removed only as long as <lWhileCondition> provides the value .T. (true). As soon as the expression results in the value .F. (false), the operation terminates.
<nCount>
<nCount> optionally specifies the number of records whose deletion flags are to be removed, starting with the current record.
<xRecordID>
<xRecordID> is an optional record ID (for DBF files it is the record number). If a record ID is specified, the deletion flag is removed only for the indicated record.
REST
The option REST determines whether the deletion flag is removed only for the records from the current record up to the last record. If a condition is specified, the option ALL is the default value.
ALL
The option ALL specifies that deletion flags are removed from all data records. If a condition is specified, the condition is tested for all records.
IN <nWorkArea>
<nWorkArea> is a positive integer specifying the ordinal number of the work area being selected.
IN <cAlias>
This argument is either a literal alias name or a character expression containing the alias name in parentheses. The alias name indicates the work area whose files are to be closed.
NOOPTIMIZE
This command option is ignored in Xbase++ 2.0
Description

The file command RECALL removes the deletion flag from records in the current work area. When the command is used without further specifications, it removes the "Deleted" status only for the current record. The deletion flag is set by the command DELETE or the function DbDelete(), which cause only a logical deletion of data records.

The visibility of records having the "Deleted" flag can be set using the command SET DELETED ON | OFF. Prior to the execution of the command RECALL, SET DELETED must be OFF. Otherwise the "Deleted" data records are not visible. The command PACK permanently deletes all data records with deletion flags from the file. After PACK is called, the deleted records can no longer be "undeleted" using RECALL.

The function DbRecall() used with DbEval() is the functional equivalent of the command RECALL.

When multi-user access is allowed, a record must be locked using RLock() before executing the command RECALL. If multiple deletion marks are to be removed, the entire file is locked using FLock().

Examples
RECALL
// The example shows various operations illustrating the 
// effect of the "Deleted" flag of a record 

PROCEDURE Main 
   USE Customer NEW 

   SET DELETED ON             // filter out records 
                              // with deletion flag 
   GO TOP 
   ? RecNo()                  // result: 1 
   ? LName                    // result: King 

   DELETE                     // set deletion flag 
   ? Deleted()                // result: .T. 

   GO TOP 
   ? RecNo()                  // result: 2 
   ? LName                    // result: Fisher 
   ? Deleted()                // result: .F. 

   SET DELETED OFF 
   GO TOP 

   ? RecNo()                  // result: 1 
   ? LName                    // result: King 
   ? Deleted()                // result: .T. 

   RECALL 
   ? Deleted()                // result: .F. 

   CLOSE Customer 
RETURN 
Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.