FireDAC.Comp.DataSet.TFDDataSet.Cancel

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure Cancel; override;

C++

virtual void __fastcall Cancel();

Properties

Type Visibility Source Unit Parent
procedure
function
public
FireDAC.Comp.DataSet.pas
FireDAC.Comp.DataSet.hpp
FireDAC.Comp.DataSet TFDDataSet

Description

Cancels modifications to the active record if those changes are not yet posted.

FireDAC.Comp.DataSet.TFDDataSet.Cancel inherits from Data.DB.TDataSet.Cancel. All content below this line refers to Data.DB.TDataSet.Cancel.

Cancels modifications to the active record if those changes are not yet posted.

Call Cancel to undo modifications made to one or more fields belonging to the active record. As long as those changes are not already posted, Cancel returns the record to its previous state, and sets the dataset state to dsBrowse.

Typically Cancel is used to back out of changes in response to user request, or in field validation routines that back out illegal field values. The TDBNavigator object contains a Cancel button that calls Cancel.

Note: If the dataset is not in an editing state (dsEdit or dsInsert), Cancel does nothing.

See Also


Code Examples