DataType: DbDataType;
The DataType property determines data type of attributes type of the MDM repository.
Executing the example requires an MDM repository with the NSI_1 identifier.
Sub Main;
Var
MB: IMetabase;
NSI: IRdsDatabase;
NSIInst: IRdsDatabaseInstance;
Folders: IRdsAttributeTypeFolders;
Folder: IRdsAttributeTypeFolder;
Type: IRdsAttributeType;
Begin
MB := MetabaseClass.Active;
NSI := MB.ItemById("NSI_1").Edit As IRdsDatabase;
NSIInst := NSI.Open(Null);
Folders := NSIInst.AttributeTypes.Folders;
Folders.Clear;
Folder := Folders.Add(New folder);
Type := Folder.Types.Add;
Type.DataType := DbDataType.DateTime;
Type.Id := "DateType";
Type.Name := Time;
NSIInst.Save;
(NSI As IMetabaseObject).Save;
End Sub Main;
After executing the example a new folder is created in a root of an attribute types dictionary. Attribute type with the Time name is created in this folder.Data type of an attribute is DateTime.
See also: