IDatasetModelField.DataDomain

Syntax

DataDomain:

Description

The DataDomain property determines the data type of data source field, if it is intended for storage of multibyte information.

NOTE. The field can store the multibyte information, if the IDatasetModelField.DataType property is set to DbDataType.String or DbDataType.Blob.

Example

Executing the example requires that the repository contains a table with the TBL identifier.

Sub Main;

Var

MB: IMetabase;

DSInst: IDatasetInstance;

DSModel: IDatasetModel;

Fields: IDatasetModelFields;

Field: IDatasetModelField;

j, i: Integer;

Begin

MB := MetabaseClass.Active;

MB := MetabaseClass.Active;

DSInst := MB.ItemById("TBL").Open(Null) As IDatasetInstance;

DSModel := DSInst.Dataset;

Fields := DSModel.Fields;

For j := 0 To Fields.Count - 1 Do

Field := Fields.Item(j);

i := Field.DataType;

If (i = DbDataType.Blob) Then

Select Case Field.DataDomain

Case DbDataDomain. None: Debug. WriteLine ("Field" + Field. Name + "stores binary data");

Case DbDataDomain. Memo: Debug. WriteLine ("Field" + Field. Name + "stores text data");

Case DbDataDomain. Raw: Debug. WriteLine ("Field" + Field. Name + "stores user data");

End Select;

End If;

End For;

End Sub Main;

After executing the example, the console window displays the information on table fields that are used to store multibyte information.

See also:

IDatasetModelField