Delete method

Applies To
TQDB, TQDBItem, TQDBView

Declaration
procedure Delete;

Description
Delete belongs to the family of QDB methods corresponding to the buttons of TQDBNavigator. Delete erases the current item. Delete can be called directly or via TQDBNavigator.

Delete behaves differently in the different descendants of TQDB as each descendant adds its own functionality.

In TQDB
The Delete method deletes the current item irreversibly. ItemIndex shifts to the previous item if there is one. The QDB file on disk does not shrink until the Pack method has been used.

When successful Delete generates an OnDeleted event.

If the FileName property is not set (i.e., Ready is false) the Delete method raises an EQDBNoFile exception.

In TQDBItem
As above but additionally loads the newly current item or, if the file is empty, creates an empty one.

In TQDBView
As above but also puts the panel into the appropriate mode -- see AutoEdit.