IDalCursorField.DataDomain

Syntax

DataDomain: DbDataDomain;

Description

This property is read-only.

The DataDomain property returns type of the field data, if the field is used to store multibyte information.

Comments

The filed can store multibyte information if the GetDbDataType property returns the DbDataType.String or DbDataType.Blob value. Working with multibyte information is described in the knowledge database in the article Working with fields that have custom data type.

Example

Executing the example requires a database with the DB identifier in the repository. 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;

Information about the table fields that are used to store multibyte information is displayed in the console window after executing this example.

See also:

IDalCursorField