RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomClientDataSet.Cancel Method

Cancels unposted changes to the current record.

Pascal
procedure Cancel; override;
C++
virtual __fastcall Cancel();

Call Cancel to undo modifications made to one or more fields belonging to the current record. As long as those changes are not already posted to the change log, Cancel returns the record to its previous state, and sets the dataset state to dsBrowse.

Note: Do not confuse Cancel with the RevertRecord method, which also backs out changes to the current record. Cancel backs out unposted changes while RevertRecord removes changes that have already been posted to the change log.
 

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