FireDAC.Comp.DataSet.TFDDataSet.Delta

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Delta: IFDDataSetReference read GetDelta;

C++

__property _di_IFDDataSetReference Delta = {read=GetDelta};

Properties

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

Description

Represents the changed records of the dataset.

The Delta property value represents the set of changed records in the dataset. The set may be assigned to other datasetsData property. The delta may be not empty only when CachedUpdates is True

The property value is a reference to IFDDataSet interface. It is reference counted and application does not need explicitly to free it. If application keeps the interface reference using a variable or a field, then reference must be released before dataset will be closed. 

In case you are processing the dataset Delta using TFDMemTable as:

 FDMemTable1.Data := ADQuery1.Delta;

Make sure the filter changes property reflects the records (modified, inserted or deleted) you want to process:

 ADMemTable1.FilterChanges := [rtModified, rtInserted, rtDeleted];

Example

// copy to ADMemTable1 all ADQuery1 changed records and their versions
ADMemTable1.FilterChanges := [rtModified, rtInserted, rtDeleted];
ADMemTable1.Data := ADQuery1.Delta;

See Also