Share via


AdomdCommand.ExecuteReader Method

Runs the AdomdCommand and returns an AdomdDataReader.

Namespace:  Microsoft.AnalysisServices.AdomdServer
Assembly:  msmgdsrv (in msmgdsrv.dll)

Syntax

'Declaration
Public Function ExecuteReader As AdomdDataReader
'Usage
Dim instance As AdomdCommand 
Dim returnValue As AdomdDataReader 

returnValue = instance.ExecuteReader()
public AdomdDataReader ExecuteReader()
public:
virtual AdomdDataReader^ ExecuteReader() sealed
abstract ExecuteReader : unit -> AdomdDataReader  
override ExecuteReader : unit -> AdomdDataReader
public final function ExecuteReader() : AdomdDataReader

Return Value

Type: Microsoft.AnalysisServices.AdomdServer.AdomdDataReader
A data reader.

Exceptions

Exception Condition
AdomdErrorResponseException

The provider returned an error in response.

[T:System:InvalidOperationException]

The CommandText property was improperly set

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.

See Also

Reference

AdomdCommand Class

ExecuteReader Overload

Microsoft.AnalysisServices.AdomdServer Namespace