Show contents 

Db > Db Assembly Interfaces > IDatasetInstance > IDatasetInstance.OpenCached

IDatasetInstance.OpenCached

Syntax

OpenCached: ICachedDataset;

Description

The OpenCached method allows working with cache of data source.

Example

Sub UserProc;
Var
    MB: IMetabase;
    DSInst: IDatasetInstance;
    Cache: ICachedDataset;
    i: Integer;
Begin
    MB := MetabaseClass.Active;
    DSInst := MB.ItemById("Table_1").Open(NullAs IDatasetInstance;
    Cache := DSInst.OpenCached;
    i := Cache.RecordCountAll;
    Cache.Close;
    DSInst.Close;
End Sub UserProc;

After executing the example, the "i" variable contains the number of all records in cache.

See also:

IDatasetInstance