FireDAC.Comp.DataSet.TFDDataSet.ChangeCount
Delphi
property ChangeCount: Integer read GetChangeCount;
C++
__property int ChangeCount = {read=GetChangeCount, nodefault};
Contents
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | public | FireDAC.Comp.DataSet.pas FireDAC.Comp.DataSet.hpp |
FireDAC.Comp.DataSet | TFDDataSet |
Description
Gets the number of changes in the change log.
Use ChangeCount to determine how many modifications are in the dataset's change log. ChangeCount:
- Increases when the data is edited (for example, Edit / Post).
- Decreases when changes are undone (for example, UndoLastChange).
- Sets to zero after committing (CommitUpdates) or canceling all updates (CancelUpdates).
Example
procedure TForm1.FDQuery1AfterPost(DataSet: TDataSet);
begin
if TFDDataSet(DataSet).ChangeCount = 0 then
StatusBar1.SimpleText := 'no changes'
else
StatusBar1.SimpleText := Format('%d changed rows', [TFDDataSet(DataSet).ChangeCount]);
end;