xHarbour Reference Documentation > Command Reference xHarbour Developers Network  

RECALL

Removes a deletion mark from one or more records.

Syntax

RECALL [<Scope>] ;
[WHILE <lWhileCondition>] ;
  [FOR <lForCondition>]

Arguments

<scope>
This option defines the number of records to unmark for deletion. It defaults to the current record. The NEXT <nCount> scope removes the deletion mark from the next <nCount> records, while the RECORD <nRecno> scope processes only one record having the record number <nRecno>. The option ALL marks all records for deletion.

The default scope becomes ALL when a FOR condition is specified.

WHILE <lWhileCondition>
This is a logical expression indicating to continue unmarking records for deletion while the condition is true. The RECALL command stops as soon as <lWhileCondition> yields .F. (false).
FOR <lForCondition>
This is a logical expression which is evaluated for all records in the current work area. Those records where <lForCondition> yields .T. (true) are unmarked for deletion.

Description

The RECALL command removes the deletion mark for one or more records in the current work area. A record is marked for deletion with the DELETE command.

When a database is open in SHARED mode, the current record must be locked with the RLock() function before RECALL may be called. Failure to do so generates a runtime error. If multiple records should be unmarked for deletion, the entire file must be locked using FLock(), or the file must be open in EXCLUSIVE mode.

Note:  The RECALL command can remove a deletion flag only until PACK is executed.

Info

See also:DbEval(), DbRecall(), DELETE, Deleted(), FLock(), RLock(), PACK, SET DELETED, ZAP
Category: Database commands
Source:rdd\dbcmd.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example demonstrates the effect of a deletion mark.

   PROCEDURE Main
      USE Customer NEW EXCLUSIVE

      DELETE RECORD 20
      ? Deleted(), Recno()             // result: .T.  20

      RECALL
      ? Deleted(), Recno()             // result: .F.  20

      CLOSE Customer
   RETURN

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe