IMetaDictionary.AttributeNamings

Syntax

AttributeNamings: IMetaAttributeNamings;

Description

The AttributeNamings property returns a collection of attributes names.

Comments

The IMetaAttributeNamings.NamingDelimiter property determines character to be used as a delimiter of attributes names.

Example

Executing the example requires an MDM repository with the RDS_REPO identifier and a database with the DB identifier.

Sub Main;

Var

Mb: Imetabase;

ObjMb: IMetabaseObject;

RDS: IMetabaseObjectDescriptor;

Dict: IMetaDictionary;

CrInfo: IMetabaseObjectCreateInfo;

Des: IMetabaseObjectDescriptor;

Attributes: IMetaAttributes;

Att: IMetaAttribute;

AttrNamings: IMetaAttributeNamings;

AttNm: IMetaAttributeNaming;

Begin

Mb := MetabaseClass.Active;

CrInfo := Mb.CreateCreateInfo;

CrInfo.Id := "DICT1";

CrInfo.Name := "Dict";

CrInfo.ClassId := MetabaseObjectClass.KE_CLASS_METADICTIONARY;

RDS := Mb.ItemById("RDS_REPO");

CrInfo.Parent := RDS;

Des := Mb.CreateObject(CrInfo);

ObjMb := Des.Edit;

Dict := ObjMb.GetExtensionDispatch As IMetaDictionary;

Dict.Database := Mb.ItemById("DB").Bind As IDatabase;

Attributes := Dict.Attributes;

Attributes.CreateTable;

AttrNamings := Dict.AttributeNamings;

Att := Attributes.Add;

Att.DataType := DbDataType.Integer;

Att.Id := "KEY";

Att.Name := Key;

Att.Nullable := False;

AttNm := AttrNamings.Add(Att);

ObjMb.Save;

End Sub Main;

After executing the example an object (the DICT1 identifier), used to store system information, is created in the MDM repository with one mandatory attribute KEY. A table to store attributes values is also created.

See also:

IMetaDictionary