DataType (clsColumn)
Примечание. |
---|
В следующей версии Microsoft SQL Server эта возможность будет удалена. Не используйте ее при работе над новыми приложениями и как можно быстрее измените приложения, в которых она в настоящее время используется. |
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
Замечания
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