FireDAC.Comp.DataSet.TFDDataSet.UpdateStatus

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function UpdateStatus: TUpdateStatus; override;

C++

virtual Data::Db::TUpdateStatus __fastcall UpdateStatus();

Properties

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

Description

Returns the modification status for the current record.

Use the UpdateStatus method to get the modification status for the current dataset record. The function returns one of the following values.

Status 

Description 

usUnmodified

Record is in its original unmodified state. 

usModified

Record is modified. Changes are not posted to the database.

usDeleted

Record is deleted. Changes are not posted to the database. 

usInserted

Record is inserted. Changes are not posted to the database. 

Example

procedure TForm1.FDQuery1AfterScroll(DataSet: TDataSet);
begin
  case TFDQuery(DataSet).UpdateStatus of
  usUnmodified: Label1.Caption := '';
  usModified: Label1.Caption := 'Modified';
  usDeleted: Label1.Caption := 'Deleted';
  usInserted: Label1.Caption := 'Inserted';
  end;
end;

See Also