ICachedDataset.Last

Syntax

Last;

Description

The Last method goes to the last record in cache.

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;
    Cache.Last;
    i := Cache.RecNo;
    Cache.Close;
    DSInst.Close;
End Sub UserProc;

After executing the example, the user goes to the last record in cache, and the "i" variable contains index of the record, on which the cursor was put in cache.

See also:

ICachedDataset