The Command object supports text commands in the MDX expression syntax by using the OLE DB ICommandText interface. Consumers use the ICommandText::SetCommandText method to specify the command and the ICommand::Execute method to process the command. For commands that may be used several times, consumers can prepare the command with the ICommandPrepare::Prepare method. For a complete discussion of OLE DB Command object, see the OLE DB Programmer's Reference. For additional information about the MDX expression syntax defined by OLE DB for OLAP and its use, see “Multidimensional Expressions (MDX) and Dataset” and “Advanced MDX” in Chapter 2. For the complete syntax of MDX, see Appendix C, “MDX Grammar.”
OLE DB for OLAP defines a GUID — MDGUID_MDX — which denotes the MDX expression syntax. This GUID is used in ICommandText::SetCommandText to identify to the provider that the query language being used is the MDX expression syntax defined in Appendix C of this document.