SET DELETED Command

See Also

Specifies whether Visual FoxPro processes records marked for deletion and whether they are available for use in other commands.

Syntax

SET DELETED ON | OFF

Arguments

ON

Specifies that commands which operate on records (including records in related tables) using a scope ignore records marked for deletion.

OFF

(Default) Specifies that records marked for deletion can be accessed by commands that operate on records (including records in related tables) using a scope.

Remarks

Queries that use DELETED( ) to test the status of records can be optimized using Rushmore technology if the table is indexed on DELETED( ).

For more information on optimizing queries, see "Understanding Rushmore Technology" in Chapter 15, Optimizing Applications, in the Programmer's Guide.

You can mark records for deletion by issuing DELETE – SQL or DELETE, or by choosing Delete Records... from the Table menu from within a Browse or Edit window.

You can recall records by issuing RECALL or by choosing Recall Records... from the Table menu from within a Browse or Edit window.

Important   SET DELETED is ignored if the default scope for the command is the current record or you include a scope of a single record. INDEX and REINDEX always ignore SET DELETED and index all records in the table.

SET DELETED is scoped to the current data session.