AnyDAC
ContentsIndexHome
PreviousUpNext
TADDataSet.Delta Property

Represents the changed records of the dataset.

Group
Links

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 reference to IADDataSet 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 TADMemTable as: 

 

ADMemTable1.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];
property Delta: IADDataSetReference;
// copy to ADMemTable1 all ADQuery1 changed records and their versions
ADMemTable1.FilterChanges := [rtModified, rtInserted, rtDeleted];
ADMemTable1.Data := ADQuery1.Delta;
What do you think about this topic? Send feedback!