Data.DB.TDataSet.Delete

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type:
procedure
function
Visibility: public
Source:
Data.DB.pas
Data.DB.hpp
Unit: Data.DB
Parent: TDataSet

Delphi

procedure Delete;

C++

void __fastcall Delete();

Description

Deletes the active record and positions the dataset on the next record.

Call Delete to remove the active record from the database. If the dataset is inactive, Delete raises an exception. Otherwise, Delete:

  • Verifies that the dataset is not empty (and raises an exception if it is).
  • Calls CheckBrowseMode to post any pending changes to a prior record if necessary.
  • Calls the BeforeDelete event handler.
  • Deletes the record.
  • Frees any buffers allocated for the record.
  • Puts the dataset into dsBrowse mode.
  • Resynchronizes the dataset to make the next undeleted record active. If the record deleted was the last record in the dataset, then the previous record becomes the current record.
  • Calls the AfterDelete event handler.

See Also