RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TClientDataSetRevert.ExecuteTarget Method

Backs out all changes to the current record of the target client dataset.

Pascal
procedure ExecuteTarget(Target: TObject); override;
C++
virtual __fastcall ExecuteTarget(TObject * Target);

You can call ExecuteTarget directly to execute this action, or it can be called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action). 

ExecuteTarget checks that Target is a data source component whose DataSet property references a TClientDataSet instance. If the DataSource property is set, Target must be the same data source. 

If Target is a valid data source, ExecuteTarget calls the associated client dataset's RevertRecord method. This returns the record to the values it held when first fetched from the source dataset. Note that unlike the TClientDataSetUndo action, this backs out all edits to the record, not just those made during the last edit operation. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!