ICachedDataset.Truncate

Syntax

Truncate;

Description

The Truncate method removes all records of data source.

Example

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

After executing the example, all records of data source are removed.

See also:

ICachedDataset