MDAC 2.5 SDK - OLE DB Programmer's Reference
Chapter 22: OLE DB for OLAP Objects and Schema Rowsets
There is one rowset for every axis. This rowset has at least 5n+1 columns, where n is the number of dimensions projected along the axis (because there are five default properties that are available for each axis, and one more column for the TUPLE_ORDINAL value). In addition, there might be provider-specific default properties, or the application might have selected additional properties by using the DIMENSION PROPERTIES clause. For this reason, it is possible for a dimension to have more than five columns. The rgcColumns field in the MDAXISINFO structure for this axis points to an array containing the number of columns in the axis rowset for this dimension.
The range rowset is a rowset in which each row corresponds to a cell in the dataset. Each selected cell property appears as a column in this rowset. Range rowsets provide the means for updating the axis rowset. For more information about these rowsets, see "Range Rowsets" in Chapter 23, "Rowsets in OLE DB for OLAP." Also in Chapter 23, see "Creating an Accessor to Fetch Data" for an explanation of how the application, before fetching cell data, can create an accessor that describes the structure of the data buffer.
The axis rowset has columns in the following order:
The five default properties for each dimension, in order of their occurrence in the axis rowset, are as follows:
Note the following rules about DISPLAY_INFO:
To distinguish these column names, they are prefixed by <dimension_name>. For example, the column names for the SalesRep dimension are: "[SalesRep].[MEMBER_UNIQUE_NAME]", "[SalesRep].[MEMBER_CAPTION]", "[SalesRep].[LEVEL_UNIQUE_NAME]", "[SalesRep].[LEVEL_NUMBER]", "[SalesRep].[DISPLAY_INFO]".
The data type for the TUPLE_ORDINAL value is DBTYPE_UI4. The data types for the five mandatory properties are listed in the following table.
Default column properties | Data type |
MEMBER_UNIQUE_NAME | DBTYPE_WSTR |
MEMBER_CAPTION | DBTYPE_WSTR |
LEVEL_UNIQUE_NAME | DBTYPE_WSTR |
LEVEL_NUMBER | DBTYPE_I4 |
DISPLAY_INFO | DBTYPE_UI4 |
The data types of provider-specific properties and properties selected by using the DIMENSION PROPERTIES clause are available in the PROPERTIES schema rowset. This information is also available by calling IColumnsInfo on the rowset object corresponding to an axis rowset.
Consider the following dataset:
This dataset has two axes, x and y (0 and 1).
The x-axis has the following elements:
Note that the country Japan has no regions defined in this database. Note also that USA_North has its cities expanded, while USA_South does not have its cities expanded.
The y-axis has the following elements:
Qtr1 and Qtr4 have their months expanded, while Qtr2 and Qtr3 do not.
The MDAXISINFO structure for the x-axis has:
The MDAXISINFO structure for the y-axis has:
The axis rowset for the x-axis is shown in the following table. (The value of DISPLAY_INFO is shown in the form "x, y, z", where z = number of children, y = MDDISPINFO_DRILLED_DOWN, and x = MDDISPINFO_SAME_PARENT_AS_PREV.)
TUPLE_ORDINAL | [SalesRep].[MEMBER_UNIQUE_NAME] | [SalesRep].[MEMBER_CAPTION] | [SalesRep].[LEVEL_UNIQUE_NAME] | [SalesRep].[LEVEL_NUMBER] | [SalesRep].[DISPLAY_INFO] |
0 | [SalesRep].[Venkatrao] | Venkatrao | RepName | 1 | 0, 0, 0 |
1 | [SalesRep].[Venkatrao] | Venkatrao | RepName | 1 | 0, 0, 0 |
2 | [SalesRep].[Venkatrao] | Venkatrao | RepName | 1 | 0, 0, 0 |
3 | [SalesRep].[Venkatrao] | Venkatrao | RepName | 1 | 0, 0, 0 |
4 | [SalesRep].[Netz] | Netz | RepName | 1 | 0, 0, 0 |
5 | [SalesRep].[Netz] | Netz | RepName | 1 | 0, 0, 0 |
6 | [SalesRep].[Netz] | Netz | RepName | 1 | 0, 0, 0 |
7 | [SalesRep].[Netz] | Netz | RepName | 1 | 0, 0, 0 |
(This is the same table continued.)
[Geography].[MEMBER_UNIQUE_NAME] | [Geography].[MEMBER_CAPTION] | [Geography].[LEVEL_UNIQUE_NAME] | [Geography].[LEVEL_NUMBER] | [Geography].[DISPLAY_INFO] |
[The World].[North America].[USA].[USA_North].[Seattle] | Seattle | City | 5 | 0, 0, 0 |
[The World].[North America].[USA].[USA_North].[Boston] | Boston | City | 5 | 1, 0, 0 |
[The World].[North America].[USA].[USA_South] | Southern Region, USA | Region | 3 | 0, 0, 25 |
[The World].[Asia].[Japan] | Japan | Country | 2 | 0, 0, 12 |
[The World].[North America].[USA].[USA_North].[Seattle] | Seattle | City | 5 | 0, 0, 0 |
[The World].[North America].[USA].[USA_North].[Boston] | Boston | City | 5 | 1, 0, 0 |
[The World].[North America].[USA].[USA_South] | Southern Region, USA | Region | 3 | 0, 0, 25 |
[The World].[Asia].[Japan] | Japan | Country | 2 | 0, 0, 12 |
The axis rowset for the y-axis follows. (The value of DISPLAY_INFO is shown in the form "x, y, z", where z = number of children, y = MDDISPINFO_DRILLED_DOWN, and x = MDDISPINFO_ SAME_PARENT_AS_PREV.)
TUPLE_ORDINAL | [Quarters].[MEMBER_UNIQUE_NAME] | [Quarters].[MEMBER_CAPTION] | [Quarters].[LEVEL_UNIQUE_NAME] | [Quarters].[LEVEL_NUMBER] | [Quarters].[DISPLAY_INFO] |
0 | January | January | Month | 2 | 0, 0, 31 |
1 | February | February | Month | 2 | 1, 0, 29 |
2 | March | March | Month | 2 | 1, 0, 31 |
3 | Qtr2 | Quarter 2 | Quarter | 1 | 0, 0, 3 |
4 | Qtr3 | Quarter 3 | Quarter | 1 | 1, 0, 3 |
5 | October | October | Month | 2 | 0, 0, 31 |
6 | November | November | Month | 2 | 1, 0, 30 |
7 | December | December | Month | 2 | 1, 0, 31 |
Note In this example, it is assumed that the members of the SalesRep and Geography dimensions need to be qualified and that members from all other dimensions need not be qualified (to ensure uniqueness). It is also assumed that all level names are unique without qualification.