Compartilhar via


DataType (clsColumn)

Note

  This feature will be removed in the next version of Microsoft SQL Server. Do not use this feature in new development work, and modify applications that currently use this feature as soon as possible.

The DataType property identifies the data type of an object of ClassType clsColumn. This property applies only to columns of SubClassType sbclsRegular.

Data Type

ADODB.DataTypeEnum

Access

Read/write

Remarks

Values for the DataType property are supplied by the Microsoft® ActiveX® Data Objects (ADO) DataTypeEnum enumeration constants. For more information, see the ADO documentation.

Examples

Setting the DataType Property

The following example adds a new column to a data mining model object. It then sets various properties, including the DataType property.

'------------------------------------------------------------------------
' Add a new column to the mining model called Unit Sales and relate
' this column to the Sales cube measure of the same name. Set the
' column's data type to Integer, and identify the data content in it as
' being continuous and logarithmically normalized. Finally, identify this
' column as being predictable.
' Assume the existence of a DSO Cube object, dsoCb.
'------------------------------------------------------------------------
    'Add another column to the model.
    Set dsoColumn = dsoDmm.Columns.AddNew("Unit Sales")
    'Identify this column as being based on the Unit Sales measure.
    Set dsoColumn.SourceOlapObject = dsoCb.Measures("Unit Sales")
    'Identify the column type.
    dsoColumn.DataType = adInteger
    'Identify this column's content as being continuous.
    dsoColumn.ContentType = "CONTINUOUS"
    'Identify the statistical distribution of this data.
    dsoColumn.Distribution = "LOG_NORMAL"
    'Identify the column as being predictable.
    dsoColumn.IsPredictable = True

See Also

Reference

clsColumn

Help and Information

Getting SQL Server 2005 Assistance