OpenCached: ICachedDataset;
The OpenCached method allows for working with data source cache.
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: