AdomdCommand.ExecuteReader AdomdCommand.ExecuteReader AdomdCommand.ExecuteReader Method

Definition

Executes the CommandText against the AdomdConnection and builds the AdomdDataReader.

Overloads

ExecuteReader() ExecuteReader() ExecuteReader()

Runs the AdomdCommand and returns an AdomdDataReader.

ExecuteReader(CommandBehavior) ExecuteReader(CommandBehavior) ExecuteReader(CommandBehavior)

Runs the AdomdCommand using the specified CommandBehaviorenumeration value and returns an AdomdDataReader.

ExecuteReader() ExecuteReader() ExecuteReader()

Runs the AdomdCommand and returns an AdomdDataReader.

public:
 Microsoft::AnalysisServices::AdomdClient::AdomdDataReader ^ ExecuteReader();
public Microsoft.AnalysisServices.AdomdClient.AdomdDataReader ExecuteReader ();
Public Function ExecuteReader () As AdomdDataReader
Returns
Exceptions

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

Remarks

While the AdomdDataReader is in use, the AdomdCommand and the associated AdomdConnection are busy serving the AdomdDataReader. While in this state, the AdomdConnection or AdomdCommand can only be closed; no other operations can be performed on them. This remains the case until the Close or Dispose method of the AdomdDataReader is called.

ExecuteReader(CommandBehavior) ExecuteReader(CommandBehavior) ExecuteReader(CommandBehavior)

Runs the AdomdCommand using the specified CommandBehaviorenumeration value and returns an AdomdDataReader.

public:
 Microsoft::AnalysisServices::AdomdClient::AdomdDataReader ^ ExecuteReader(System::Data::CommandBehavior behavior);
public Microsoft.AnalysisServices.AdomdClient.AdomdDataReader ExecuteReader (System.Data.CommandBehavior behavior);
Public Function ExecuteReader (behavior As CommandBehavior) As AdomdDataReader
Parameters
behavior
CommandBehavior CommandBehavior CommandBehavior

A CommandBehaviorenumeration value that indicates the behavior of the AdomdCommand during or after the command runs.

Returns

Remarks

The values CommandBehavior.KeyInfo and CommandBehavior.SingleResult are not supported, and are ignored.

Applies to