The FromClause property of the Dimension interface contains the SQL FROM clause for the dimension.
clsAggregationDimension | clsDatabaseDimension |
clsCubeDimension | clsPartitionDimension |
String
The access type depends on the class of the dimension object.
Class | Access |
---|---|
clsDatabaseDimension | R/W |
clsCubeDimension | R |
clsPartitionDimension | R |
clsAggregationDimension | R/W |
A database contains the following tables:
The following diagram illustrates the relationships of these tables.
Use the following code to create a dimension, assign a data source, and set the FromClause property:
'Assume an object (dsoDB) of ClassType clsDatabase exists
'Create Product Dimension for database
Dim dsoDim as DSO.Dimension
Set dsoDim = dsoDB.Dimensions.AddNew("Products")
'Create a datasource
Dim dsoDS As DSO.DataSource
Set dsoDS = dsoDB.DataSources.AddNew("FoodMart")
dsoDS.Name = "FoodMart"
dsoDS.ConnectionString = "Provider=MSDASQL.1;" &_
"Persist Security Info=False;" &_
"Data Source=FoodMart;" &_
"Connect Timeout=15"
'Assign datasource to dimension
Set dsoDim.DataSource = dsoDS 'Dimension DataSource
dsoDim.FromClause = "product" 'Source Dimension Table
'Update the database
dsoDB.Update
About Decision Support Objects | Using Decision Support Objects |
Properties Cross-Reference |