DataDomain: DbDataDomain;
The property is read-only.
The DataDomain property returns the type of the field data if the field is used to store multibyte information.
The field can store multibyte information if the GetDbDataType property returns DbDataType.String or DbDataType.Blob. Working with multibyte information is described in the knowledge database in the Working with Fields That Have Custom Data Type article.
Executing the example requires that the repository contains a database with the DB identifier. The table data with the TBL physical name are stored in this database.
Sub Main;
Var
MB: IMetabase;
DB: IDatabaseInstance;
Com: IDalCommand;
Cur: IDalCursor;
CurField: IDalCursorField;
j, i: Integer;
Begin
MB := MetabaseClass.Active;
DB := MB.ItemById("DB").Open(Null) As IDatabaseInstance;
Com := DB.Connection.CreateCommand("Select * From TBL");
Cur := Com.CreateCursor;
For j := 0 To Cur.Fields.Count - 1 Do
CurField := Cur.Fields.Item(j);
i := CurField.GetDbDataType;
If (i = DbDataType.Blob) Then
Select Case CurField.DataDomain
Case DbDataDomain.None: Debug.WriteLine("Field " + CurField.Name + " stores binary data");
Case DbDataDomain.Memo: Debug.WriteLine("Field " + CurField.Name + " stores text data");
Case DbDataDomain.Raw: Debug.WriteLine("Field " + CurField.Name + " stores user data");
End Select;
End If;
End For;
Cur.Close;
Com.Close;
End Sub Main;
After executing the example information about the table fields that are used to store multibyte information is displayed in the console window.
See also: