Command RECALL Foundation

Removes the deletion flag for one or more records.

  [FOR    <lForCondition>] ;
  [WHILE  <lWhileCondition>] ;
  [NEXT   <nCount>] ;
  [RECORD <xRecordID>] ;
  [REST]  ;
  [ALL]   ;
  [IN <nWorkArea> | <cAlias> ] ;
<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> 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> optionally specifies the number of records whose deletion flags are to be removed, starting with the current record.
<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.
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.
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.
This command option is ignored in Xbase++ 2.0

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().

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

   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. 

   GO TOP 

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

   ? Deleted()                // result: .F. 

   CLOSE Customer 

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.