FireDAC.Comp.DataSet.TFDDataSet.UpdateStatus
Delphi
function UpdateStatus: TUpdateStatus; override;
C++
virtual Data::Db::TUpdateStatus __fastcall UpdateStatus();
Contents
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 |
---|---|
|
Record is in its original unmodified state. |
|
Record is modified. Changes are not posted to the database. |
|
Record is deleted. Changes are not posted to the database. |
|
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;