Return and optionally change the setting that determines whether to ignore or include records that are marked for deletion.
XSharp.Core (in XSharp.Core.dll) Version: 2.16
Syntax Request Example
FUNCTION SetDeleted() AS LOGIC
public static bool SetDeleted()
is not specified, SetDeleted() returns the current setting.
is specified, the previous setting is returned.
SetDeleted() toggles automatic filtering of records marked for deletion in all work areas. When TRUE is specified, most commands ignore deleted records.
If, however, you refer to a record by record number (GOTO or any command that supports the RECORD scope), the record is not ignored, even if it is marked for deletion.
Additionally, TRUE has no effect on INDEX or reindexing.
Note: RECALL ALL honors SetDeleted() and does not recall any records.
Filtering deleted records in a single work area:|
To confine the filtering of deleted records to a particular work area, select the work area, then set the filter to !Deleted().
This example illustrates the effect of using SetDeleted():
1USE sales NEW
3DELETE RECORD 4
4COUNT TO nCount
7COUNT TO nCount