NativeName: String;
The NativeName property determines a physical name of the table in a database. Value of the property is automatically switched to the upper case at table saving.
Executing the example requires that the repository contains a database with the BD identifier.
Sub Main;
Var
MB: IMetabase;
CrInfo: IMetabaseObjectCreateInfo;
Table: ITable;
MObj: IMetabaseObject;
f: ITableField;
Begin
MB := MetabaseClass.Active;
CrInfo := MB.CreateCreateInfo;
CrInfo.ClassID := MetabaseObjectClass.KE_CLASS_TABLE;
CrInfo.Id := "New_Table";
CrInfo.Name := "New_Table";
CrInfo.Parent := MB.Root;
MObj := MB.CreateObject(CrInfo).Edit;
Table := MObj As ITable;
Table.Database := Mb.ItemById("BD").Bind As IDatabase;
f := Table.Fields.Add;
f.DataType := DbDataType.String;
f.Id := "Text_Field";
f. Name: = "Text field";
f.Size := 50;
Table.NativeName := "New_Table";
MObj.Save;
End Sub Main;
After executing the example, a new table is created in repository root. This table contains one text field.
See also: