IDatasetInstanceField.OldValue

Syntax

OldValue: Variant;

Description

The OldValue property returns an old value of data source field.

Example

Sub Main;

Var

MB: IMetabase;

DSInst: IDatasetInstance;

Fields: IDatasetInstanceFields;

v, v1: Variant;

Cach: ICachedDataset;

Begin

MB := MetabaseClass.Active;

DSInst := MB.ItemById("Table_1").Open(Null) As IDatasetInstance;

Cach := DSInst.OpenCached;

Cach.Edit;

Fields := Cach.Fields;

Fields.Item(0).Value := 100;

v := Fields.Item(0).Value;

v1 := Fields.Item(0).OldValue;

Cach.Cancel;

End Sub Main;

After executing the example, the value of the first field in data source cache is changed, the "v" variable contains its new value, and the "v1" variable contains the old value of the field. After that all changes are cancelled.

See also:

IDatasetInstanceField