Show contents 

Db > Db Assembly Interfaces > ICachedDataset > ICachedDataset.GetFieldValue

ICachedDataset.GetFieldValue

Syntax

GetFieldValue(RecNo: Integer; FieldNo: Integer): Variant;

Parameters

RecNo. Record number.

FieldNo. Column number.

Description

The GetFieldValue method returns value of cached field without moving by records.

Example

Sub UserProc;
Var
    MB: IMetabase;
    DSInst: IDatasetInstance;
    Cache: ICachedDataset;
    v: Variant;
Begin
    MB:=MetabaseClass.Active;
    DSInst:=MB.ItemById("Table_1").Open(NullAs IDatasetInstance;
    Cache:=DSInst.OpenCached;
    Cache.FetchToRecord(Cache.RecordCountAll);
    v:=Cache.GetFieldValue(3,3);
    Cache.Close;
    DSInst.Close;
End Sub UserProc;

After executing the example the "v" variable contains value of the fourth column, the fourth record of the cache.

See also:

ICachedDataset