The range rowset is a rowset of which 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 IMDDataset::GetCellData. IMDRangeRowset is an optional interface on the dataset object. For information on how to find out if the range rowset is supported by the provider or not, see Data Source Property, MDPROP_RANGEROWSET.
Consider the dataset in Cube and Dataset Example. The call
IMDRangeRowset::GetRangeRowset(NULL, 1, 19, cProperties, rgPropertySets,
&pIRowsetChange);
returns the following rowsets, assuming that the default properties CELL_ORDINAL, VALUE, and FORMATTED_VALUE were selected:
CELL_ORDINAL | VALUE | FORMATTED_VALUE |
1 | 10 | 10 |
2 | 20 | 20 |
3 | 30 | 30 |
9 | 11 | 11 |
10 | 21 | 21 |
11 | 31 | 31 |
17 | 12 | 12 |
18 | 22 | 22 |
19 | 32 | 32 |
Note The quotation marks around values in the FORMATTED_VALUE column are there as a visual aid to point out that they are strings. The provider does not return the quotes.
The primary uses of the range rowset are:
The following rules govern the structure of the range rowset:
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).