Using ADO with ADO MD

ADO and ADO MD are related but separate object models. ADO provides objects for connecting to data sources, executing commands, retrieving tabular data and schema metadata in a tabular format, and viewing provider error information. ADO MD provides objects for retrieving multidimensional data and viewing multidimensional schema metadata.

When you work with an MDP, you can choose to use ADO, ADO MD, or both with your application. By referencing both libraries within your project, you will have full access to the functionality provided by your MDP.

It is frequently useful for consumers to get a flattened, tabular view of a multidimensional dataset. You can do this by using the ADO Recordset object. Specify the source for your Cellset as the Source parameter for the Open method of a Recordset, rather than as the source for an ADO MD Cellset.

It may also be useful to view the schema metadata in a tabular view rather than as a hierarchy of objects. The ADO OpenSchema method on the Connection object lets the user open a Recordset that contains schema information. The QueryType parameter of the OpenSchema method has several SchemaEnum values that relate specifically to MDPs. These values are as follows:

  • adSchemaCubes

  • adSchemaDimensions

  • adSchemaHierarchies

  • adSchemaLevels

  • adSchemaMeasures

  • adSchemaMembers

To use ADO enumeration values with ADO MD properties or methods, your project must reference both the ADO and ADO MD libraries. For example, you can use the ADO adState enumeration values with the ADO MD State property. For more information about how to establish references to libraries, see the documentation of your development tool.

For more information about the ADO objects and methods, see the ADO API Reference.

See Also

ADO MD Object Model
ADO (Multidimensional) (ADO MD)
Overview of Multidimensional Schemas and Data
Programming with ADO MD
Working with Multidimensional Data