MDAC 2.5 SDK - OLE DB Programmer's Reference
Chapter 23: Rowsets in OLE DB for OLAP
In a range rowset, each row corresponds to a cell in the dataset. Each selected cell property appears as a column in this rowset. The range rowset can be created from the dataset by the IMDRangeRowset::GetRangeRowset method. The range rowset does not have to contain all the cells of the dataset. A subset of cells may be chosen in a manner similar to that used in IMDDataset::GetCellData. IMDRangeRowset is an optional interface on the dataset object. For information about how to determine whether or not the range rowset is supported by the provider, see "Data Source Property MDPROP_RANGEROWSET."
Consider the dataset in the SalesData example. The call
IMDRangeRowset::GetRangeRowset(NULL, 1, 19, cProperties, rgPropertySets,
&pIRowsetChange);
returns the rowset shown in the following table, assuming that the default properties—VALUE, FORMATTED_VALUE, and CELL_ORDINAL—were selected.
Note The quotation marks around values in the FORMATTED_VALUE column are there as a visual aid to indicate that they are strings. The provider does not return the quotes.
VALUE | FORMATTED_VALUE | CELL_ORDINAL |
10 | "10" | 1 |
20 | "20" | 2 |
30 | "30" | 3 |
11 | "11" | 9 |
21 | "21" | 10 |
31 | "31" | 11 |
12 | "12" | 17 |
22 | "22" | 18 |
32 | "32" | 19 |
The primary uses of the range rowset are as follows:
The following rules govern the structure of the range rowset:
Otherwise, the columns are VALUE, FORMATTED_VALUE, and CELL_PROPERTIES, in that order
In the case where the MDX statement has a property specified multiple times in the CELL PROPERTIES clause (for example, CELL PROPERTIES CELL_ORDINAL, VALUE, FORMATTED_VALUE, and VALUE), the results are provider-specific.
Either the MDX statement has CELL_ORDINAL specified in the CELL PROPERTIES clause, but not as the first property (for example, CELL PROPERTIES VALUE, CELL_ORDINAL), or the MDX statement has a property specified multiple times in the CELL PROPERTIES clause (for example, CELL PROPERTIES CELL_ORDINAL, VALUE, FORMATTED_VALUE, VALUE).