RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TField.OldValue Property

Represents the original value of the field (as a Variant).

Pascal
property OldValue: Variant;
C++
__property Variant OldValue;

Read the OldValue property to examine or retrieve the original value of the field that was obtained from the dataset before any edits were posted. For example, in Delphi the following line replaces current pending changes with a field's original value:

NewValue :=OldValue;

Once records are applied successfully to the database, the old field value cannot be retrieved.

Note: the OldValue property is only usable when the data is accessed using a TClientDataSet component or cached updates is enabled
.  

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!