|
AnyDAC
|
Undoes the last modification to the dataset records.
|
Parameters |
Description |
|
AFollowChange: Boolean |
A flag controlling current position in dataset. |
True, if a change was undone.
Use UndoLastChange to undo the last modification to the dataset records and remove the change from the dataset change log.
The method is applicable to the datasets working in CachedUpdates = True mode.
If AFollowChange is True, then the current position in dataset is set to restored record. Otherwise the position remains unchanged.
To check if changed log is not empty read the UpdatesPending property value. If it is True, then there are changes to undo.
function UndoLastChange(AFollowChange: Boolean): Boolean;
procedure TForm1.btnUndoClick(ASender: TObject); begin ADQuery1.UndoLastChange(True); end;
See AnyDAC\Samples\Comp Layer\TADMemTable\CachedUpdates sample for details.
|
What do you think about this topic? Send feedback!
|