SourceOlapObject (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 SourceOlapObject property of an object of ClassType clsColumn identifies the source Decision Support Objects (DSO) object for the column. This property only applies to columns that belong to mining model objects of SubClassType sbclsOlap.
Data Type
Object
Access
Read/write
Remarks
The SourceOlapObject property of a column represents the source object in DSO from which the Column object draws information. The SourceOlapObject property can be set to an object with a ClassType property of:
- clsCubeDimension
- clsCubeLevel
- clsCubeMeasure
- clsMemberProperty
Any object specified in the SourceOlapObject property must be visible (that is, the IsVisible property of the object must be True). If the IsVisible property of the object is False, an error is raised.
Examples
Adding a New Column to a Data Mining Model
The following example adds a new column to a data mining model and sets its source to a level in an OLAP cube.
'Add Customer Id as a new column in the model.
Set dsoColumn = dsoDmm.Columns.AddNew("Customer Id")
'Identify the level in Sales that this column is based on.
Set dsoColumn.SourceOlapObject = dsoLvl
'Identify the type of column this is.
dsoColumn.DataType = adInteger ' This enumeration is from ADO.
'Identify this column as a key.
dsoColumn.IsKey = True