Aracılığıyla paylaş


SET DELETED Command

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

SET DELETED ON | OFF

Parameters

  • ON
    Specifies that commands that operate on records, including records in related tables, using a scope ignore records that are marked for deletion.

  • OFF
    Specifies that commands that operate on records, including records in related tables, using a scope can access records marked for deletion. (Default)

    Note

    Calling SQL SELECT with SET DELETED OFF includes records fitting the specified criteria in the result set and sets those records as available for processing. That is, SET DELETED OFF is not set for the records in the result set.

Remarks

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

For more information on optimizing queries, see Using Rushmore Query Optimization to Speed Data Access.

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.

Note

SET DELETED is ignored if the default scope for the command is the current record or if you include a scope of a single record. The exception exists with the SEEK command, in which case, SET DELETED is always respected. INDEX and REINDEX always ignore SET DELETED and index all records in the table.

SET DELETED is scoped to the current data session.

See Also

Reference

DELETE Command

DELETE - SQL Command

DELETED( ) Function

PACK Command

RECALL Command

SET DATASESSION Command

SET Command Overview

Other Resources

Commands (Visual FoxPro)

Language Reference (Visual FoxPro)