Show contents 

Rds > Rds Assembly Interfaces > IMetaDictionary > IMetaDictionary.Attributes

IMetaDictionary.Attributes

Syntax

Attributes: IMetaAttributes;

Description

The Attributes property returns a collection of dictionary attributes.

Example

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

Add links to the Cubes, Metabase, Rds system assemblies.

Sub UserProc;
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 UserProc;

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

See also:

IMetaDictionary