Interfaces

There are a number of interfaces in Decision Support Objects (DSO). Objects that have similar functionality implement a common interface.

For example, databases, cubes, partitions, and aggregations implement the MDStore interface. An MDStore is a container of multidimensional data. Databases contain cubes of related information, cubes contain partitions that store data, and aggregations are precalculated summaries of data associated with partitions. MDStore objects have similar structures - they contain collections of dimensions that categorize the data, data sources that specify which relational database management system (RDBMS) contains fact and dimension tables, roles that define the security permissions, and so forth. For more information about these objects and how they work together in OLAP Services, see Administrator’s Guide.

Given a reference to an MDStore or any other DSO interface, you can determine which type of the object you are dealing with by examining the ClassType property. The objects that implement the MDStore interface can have the following class types: clsDatabase, clsCube, clsPartition, and clsAggregation. Throughout the programmer’s reference, DSO objects are identified using this “cls” notation. The DSO.ClassTypes enumeration contains the complete list of all DSO types.

Not all objects that implement a common interface implement the interface in the same way. Some objects do not implement all of the interface properties, methods and collections. For example, database objects (clsDatabase) implement the BeginTrans method, but cube objects (clsCube) do not. Some objects restrict access to certain property so that it becomes read-only rather than read/write. Attempt to access a property or invoke a method that is not implemented results in an error raised by DSO.

DSO also exposes the following interfaces: Dimension, Level, Measure, Role, and Command. The Dimension interface defines the properties, methods, and collections that you can use to manipulate different types of dimensions: database dimensions, cube dimensions, partition dimensions, and aggregation dimensions. The Level interface defines objects that specify the dimension hierarchy. Objects that implement the Measure interface describe the values stored in cubes, partitions, and aggregations. The Role interface is implemented by objects that contain access permissions to databases and cubes. The Command interface contains multidimensional expressions (MDX) statements to be executed on the OLAP server.

The following table lists the DSO interfaces and the types of objects that implement them.

Interface Implemented by
Command clsDatabaseCommand
clsCubeCommand
Dimension clsDatabaseDimension
clsCubeDimension
clsPartitionDimension
clsAggregationDimension
Level clsDatabaseLevel
clsCubeLevel
clsPartitionLevel
clsAggregationLevel
MDStore clsDatabase
clsCube
clsPartition
clsAggregation
Measure clsCubeMeasure
clsPartitionMeasure
clsAggregationMeasure
Role clsDatabaseRole
clsCubeRole

Some DSO objects do not implement a common interface. You directly access these objects: clsServer, clsDatasource, clsCubeAnalyzer, clsPartitionAnalyzer, and clsMemberProperty. For more information about these objects, see Objects.

For more information, see About Decision Support Objects and Objects.

Remarks

The DSO type library exposes several object classes such as Cube, Database, Partition, CubeDimension, and so forth. These objects are reserved for future use and are not intended to be used in DSO applications. You should use the named interfaces instead. For example, use the following code to create a new object of ClassType clsDatabase (a database object implements the MDStore interface):

'Assume an object (dsoServer) of ClassType clsServer exists

'Add Database object to server's MDStores collection

Dim dsoDB As MDStore   ' Declare the object by the interface

Set dsoDB = dsoServer.MDStores.AddNew("MyDB")


Important Always declare an object as the interface it implements. The first line of this code creates an object that will not operate correctly with DSO, although Microsoft® Visual Basic® will not return an error.

Dim dsoDB As DSO.Database  ' INCORRECT - DO NOT USE

Dim dsoDB As DSO.MDStore   ' CORRECT


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