Getting a Flattened Rowset

The guaranteed way for a consumer to get the flattened rowset of a dataset is by setting the DBPROP_IRowset property in the DBPROPSET_ROWSET property set to VARIANT_TRUE. It should do so by using ICommandProperties::SetProperties on the command object. It should also set the rguidDialect argument of the ICommandText::SetCommandText method to MDGUID_MDX.

For more information on the rules that determine whether a rowset object or a dataset object is returned from an MDX query, see “Controlling the Creation of Instances of a Rowset or a Dataset” in Chapter 4.