Last;
The Last method performs transition to the last record in 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;
Cache.Last;
i := Cache.RecNo;
End Sub UserProc;
After executing the example, there is a transition to the last record in the cache, and the "i" variable contains index of the record on which the cursor was set in cache.
See also: