FromClause

The FromClause property of the Dimension interface contains the SQL FROM clause for the dimension.

Applies To
clsAggregationDimension clsDatabaseDimension
clsCubeDimension clsPartitionDimension

Data Type

String

Access

The access type depends on the class of the dimension object.

Class Access
clsDatabaseDimension R/W
clsCubeDimension R
clsPartitionDimension R
clsAggregationDimension R/W

Example

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

See Also
About Decision Support Objects Using Decision Support Objects
Properties Cross-Reference  

(c) 1988-1998 Microsoft Corporation. All Rights Reserved.