Db > Db Assembly Interfaces > IDatasetInstance > IDatasetInstance.OpenCached
OpenCached: ICachedDataset;
The OpenCached method allows working with cache of data source.
Sub UserProc;
Var
MB: IMetabase;
DSInst: IDatasetInstance;
Cache: ICachedDataset;
i: Integer;
Begin
MB := MetabaseClass.Active;
DSInst := MB.ItemById("Table_1").Open(Null) As 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: