ITableIndexes.FindByKey

Syntax

FindByKey(Key: Integer): ITableIndex;

Parameters

Key is the index key.

Description

The FindByKey method searches and returns the object containing table index. The key, by which search is performed, is passed by the Key parameter.

Example

Sub Main;

Var

MB: IMetabase;

Table: ITable;

Indexes: ITableIndexes;

Index: ITableIndex;

s: String;

Begin

MB:=MetabaseClass.Active;

Table:=MB.ItemById("TABLE_1").Bind As ITable;

Indexes:=Table.Indexes;

Index:=Indexes.FindByKey(1);

s:=Index.Name;

End Sub Main;

After executing the example, the "s" variable contains name of the index, key of which equals 1. The table has the Table_1 identifier.

See also:

ITableIndexes