DataSource (Dimension Interface)

Analysis Services Programming

Analysis Services Programming

DataSource (Dimension Interface)

The DataSource property of the Dimension interface specifies the source of the data to be used by a dimension object.

Applies To

clsAggregationDimension

clsCubeDimension

clsDatabaseDimension

clsPartitionDimension

Data Type

clsDataSource

Access

Access depends on the value of the ClassType property of the object.

Class type Access
ClsDatabaseDimension R/W*
ClsCubeDimension R**
ClsPartitionDimension R**
ClsAggregationDimension R

* Not implemented for virtual dimensions created in previous versions of Microsoft® SQL Server™ 2000 Analysis Services.
** Not implemented for virtual dimensions.

Example

Use the following code to add a data source to a database object:

'Assume an object (dsoDB) of ClassType clsDatabase exists.
'Add a new data source to database.
Dim dsoDS as DSO.DataSource
Set dsoDS = dsoDB.DataSources.AddNew("FoodMart 2000")

dsoDS.Name = "FoodMart"
dsoDS.ConnectionString = "Provider=MSDASQL.1;" &_
"Persist Security Info=False;" &_
"Data Source=FoodMart; " &_
"Connect Timeout=15"

'Update the database.
dsoDB.Update

See Also

Dimension Interface