IMetaAttribute.DataDomain

Syntax

DataDomain: DbDataDomain;

Description

The DataDomain property determines data type used to store multibyte information in attribute.

Comments

For attribute of the Long Text type, this property must be set to DbDataDomain.Memo, an the IMetaAttribute.DataType property must be set to DbDataType.String.

Consider the following constraints on working with the Long Text attribute:

Example

Executing the example requires that the repository contains a time series database with the TSDB_MEMO identifier not containing a time series attribute with the A_COMMENT identifier.

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

Sub UserProc;
Var
    MB: IMetabase;
    TSDB: IRubricator;
    Facts: IMetabaseObject;
    Atts: IMetaAttributes;
    Att: IMetaAttribute;
Begin
    // Get current repository
    MB := MetabaseClass.Active;
    // Get time series database
    TSDB := MB.ItemById("TSDB_MEMO").Bind As IRubricator;
    // Get time series dictionary
    Facts := (TSDB.Facts As IMetabaseObject).Edit;
    // Get time series attributes
    Atts := (Facts As IMetaDictionary).Attributes;
    // Add attribute
    Att := Atts.Add;
    // Set attribute identifier and name
    Att.Id := "A_COMMENT";
    Att.Name := "Comment";
    // Specify attribute key: long text
    Att.Kind := MetaAttributeKind.Common;
    Att.DataType := DbDataType.String;
    Att.DataDomain := DbDataDomain.Memo;
    // Specify that attribute is visible, can have
    // zero values and does not contain multiple values
    Att.Hidden := False;
    Att.Nullable := True;
    Att.HasMultipleValues := False;
    // Save changes
    Facts.Save;
End Sub UserProc;

After executing the example a new time series attribute of the Long Text type is added to time series database.

See also:

IMetaAttribute