ITableIndexes.RemoveByKey

Syntax

RemoveByKey(IndexKey: Integer): Boolean;

Parameters

IndexKey is the index key.

Description

The RemoveByKey method removes the index, key of which is passed by the IndexKey parameter.

Example

Sub UserProc;
Var
    MB: IMetabase;
    Object: IMetabaseObject;
    Table: ITable;
    Indexes: ITableIndexes;
    Index: ITableIndex;
Begin
    MB:=MetabaseClass.Active;
    Object:=MB.ItemById("TABLE_1").Edit;
    Table:=Object As ITable;
    Indexes:=Table.Indexes;
    Indexes.RemoveByKey(1);
    Object.Save;
End Sub UserProc;

After executing the example the index with key 1 is removed in the table with the Table_1 identifier.

See also:

ITableIndexes