ITableChecks.FindByKey

Syntax

FindByKey(Key: Integer): ITableCheck;

Parameters

Key is constraint key.

Description

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

Example

Sub Main;

Var

MB: IMetabase;

Table: ITable;

Checks: ITableChecks;

Check: ITableCheck;

s: String;

Begin

MB:=MetabaseClass.Active;

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

Checks:=Table.Checks;

Check:=Checks.FindByKey(1);

s:=Check.Id;

End Sub Main;

After executing the example, the "s" variable contains the identifier of constraint, key of which equals 1. The table identifier is Table_1.

See also:

ITableChecks