DataDomain: DbDataDomain;
DataDomain: Prognoz.Platform.Interop.Dal.DbDataDomain;
The DataDomain property determines data type used to store multibyte information in attribute.
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:
If Oracle or Teradata DBMS is used, it is not available to search by this attribute value.
Attributes of this type are supported only for table MDM dictionaries and composite table MDM dictionaries.
These attributes cannot be included into a unique and nonunique indexes.
These attributes may be sampled and saved slower than standard text attributes.
DataDomain can be set to DbDataDomain.Memo or to DbDataDomain.None for table MDM dictionaries or for composite table MDM dictionaries.
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.
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: