Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
ExecuteXmlReader Method

AdomdCommand.ExecuteXmlReader Method

Runs the AdomdCommand and returns an XmlReader.

Namespace:  Microsoft.AnalysisServices.AdomdClient
Assembly:  Microsoft.AnalysisServices.AdomdClient (in Microsoft.AnalysisServices.AdomdClient.dll)

public XmlReader ExecuteXmlReader()

Return Value

Type: XmlReader
An XmlReaderthat contains the results of the command.


The provider returned an error in response.


The provider sent an unrecognizable response.


The connection was broken.


An error occurred because one of the following conditions was met:

Instead of translating the XML for Analysis response from an XML format into an AdomdDataReader or CellSet, this method, returns an XmlReader that directly references the XML for Analysis response in its native XML format.

While the XmlReaderis in use, the associated AdomdConnection is busy serving the XmlReader. While in this state, the AdomdConnection can only be closed; no other operations can be performed on it. This remains the case until the Close method of the XmlReaderis called.

You should be prepared to catch any exception that can be thrown while using the XmlReader, such as the XmlException.

Community Additions

© 2015 Microsoft