共用方式為


AdomdCommand.ExecuteReader 方法

Runs the AdomdCommand and returns an AdomdDataReader.

命名空間:  Microsoft.AnalysisServices.AdomdClient
組件:  Microsoft.AnalysisServices.AdomdClient (在 Microsoft.AnalysisServices.AdomdClient.dll 中)

語法

'宣告
Public Function ExecuteReader As AdomdDataReader
'用途
Dim instance As AdomdCommand 
Dim returnValue As AdomdDataReader 

returnValue = instance.ExecuteReader()
public AdomdDataReader ExecuteReader()
public:
AdomdDataReader^ ExecuteReader()
member ExecuteReader : unit -> AdomdDataReader
public function ExecuteReader() : AdomdDataReader

傳回值

型別:Microsoft.AnalysisServices.AdomdClient.AdomdDataReader
The data reader.

例外狀況

例外狀況 條件
AdomdErrorResponseException

The provider returned an error in response.

AdomdUnknownResponseException

The provider sent an unrecognizable response.

AdomdConnectionException

The connection was broken.

System.InvalidOperationException

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

備註

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.

請參閱

參考

AdomdCommand 類別

ExecuteReader 多載

Microsoft.AnalysisServices.AdomdClient 命名空間