Retrieving Schema Information

Analysis Services Programming

Analysis Services Programming

Retrieving Schema Information

You can use Microsoft® ActiveX® Data Objects (Multidimensional) (ADO MD), ADO, or OLE DB to retrieve schema rowsets using PivotTable® Service.

To retrieve schema information for a cube, use the CubeDef object in ADO MD or the OpenSchema method in ADO. The CubeDef object contains a hierarchy of collections describing a cube's structure. A CubeDef object for a particular cube can be obtained from the Catalog object's CubeDef property. Its collections can then be iterated through to retrieve the desired schema information. Some information about the cube is not contained in the CubeDef object, such as defined actions and cell formulas. You must use the OpenSchema method to retrieve this information.

To retrieve schema rowsets, use ADO or OLE DB. In ADO, use the OpenSchema method of the Connection object to retrieve schema information into an ADO Rowset object. These results can then be browsed using usual methods. In OLE DB, use the IDBSchemaRowset COM interface to retrieve schema information.

See Also

Schema Rowsets

Using the CubeDef Object

Using the OpenSchema Method