IRdsAttribute.DataDomain

Fore Syntax

DataDomain: DbDataDomain;

Fore.NET Syntax

DataDomain: Prognoz.Platform.Interop.Dal.DbDataDomain;

Description

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

Comments

If the DataDomain property is set to DbDataDomain.Memo and the IRdsAttribute.DataType property is set to DbDataType.String, the attribute is of the Long Text type.

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

DataDomain can be set to DbDataDomain.Memo or to DbDataDomain.None for table MDM dictionaries or for composite table MDM dictionaries.

Fore Example

Executing the example requires that repository contains table MDM dictionary with the TD_MDM identifier. The dictionary should not contain the attribute with the MemoAttr identifier.

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

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Dict: IRdsDictionary;
    Attrs: IRdsAttributes;
    Attr: IRdsAttribute;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemById("TD_MDM").Edit;
    Dict := MObj As IRdsDictionary;
    Attrs := Dict.Attributes;
    Attr := Attrs.Add;
    Attr.DataType := DbDataType.String;
    Attr.DataDomain := DbDataDomain.Memo;
    Attr.Id := "MemoAttr";
    Attr.Name := "Attribute for multibyte information";
    Attr.Nullable := True;
    MObj.Save;
End Sub UserProc;

After executing the example the attribute which can be used to store multibyte information is added to the table MDM dictionary.

Fore.NET Example

The requirements and result of the Fore.NET Example execution match with those in the Fore Example.

Imports Prognoz.Platform.Interop.Dal;
Imports Prognoz.Platform.Interop.Rds;

Public Shared Sub UserProc(Params: StartParams);
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Dict: IRdsDictionary;
    Attrs: IRdsAttributes;
    Attr: IRdsAttribute;
Begin
    MB := Params.Metabase;
    MObj := MB.ItemById["TD_MDM"].Edit();
    Dict := MObj As IRdsDictionary;
    Attrs := Dict.Attributes;
    Attr := Attrs.Add();
    Attr.DataType := DbDataType.ddtString;
    Attr.DataDomain := DbDataDomain.dddMemo;
    Attr.Id := "MemoAttr";
    Attr.Name := "Attribute for multibyte information";
    Attr.Nullable := True;
    MObj.Save();
End Sub;

See also:

IRdsAttribute