共用方式為


IDbCommand.ExecuteReader Method

Executes the CommandText against the Connection and builds an IDataReader.

命名空間: Microsoft.ReportingServices.DataProcessing
組件: Microsoft.ReportingServices.Interfaces (in microsoft.reportingservices.interfaces.dll)

語法

'宣告
<StrongNameIdentityPermissionAttribute(SecurityAction.LinkDemand, PublicKey:="0024000004800000940000000602000000240000525341310004000001000100272736ad6e5f9586bac2d531eabc3acc666c2f8ec879fa94f8f7b0327d2ff2ed523448f83c3d5c5dd2dfc7bc99c5286b2c125117bf5cbe242b9d41750732b2bdffe649c6efb8e5526d526fdd130095ecdb7bf210809c6cdad8824faa9ac0310ac3cba2aa0523567b2dfa7fe250b30facbd62d4ec99b94ac47c7d3b28f1f6e4c8")> _
Function ExecuteReader ( _
    behavior As CommandBehavior _
) As IDataReader
[StrongNameIdentityPermissionAttribute(SecurityAction.LinkDemand, PublicKey="0024000004800000940000000602000000240000525341310004000001000100272736ad6e5f9586bac2d531eabc3acc666c2f8ec879fa94f8f7b0327d2ff2ed523448f83c3d5c5dd2dfc7bc99c5286b2c125117bf5cbe242b9d41750732b2bdffe649c6efb8e5526d526fdd130095ecdb7bf210809c6cdad8824faa9ac0310ac3cba2aa0523567b2dfa7fe250b30facbd62d4ec99b94ac47c7d3b28f1f6e4c8")] 
IDataReader ExecuteReader (
    CommandBehavior behavior
)
[StrongNameIdentityPermissionAttribute(SecurityAction::LinkDemand, PublicKey=L"0024000004800000940000000602000000240000525341310004000001000100272736ad6e5f9586bac2d531eabc3acc666c2f8ec879fa94f8f7b0327d2ff2ed523448f83c3d5c5dd2dfc7bc99c5286b2c125117bf5cbe242b9d41750732b2bdffe649c6efb8e5526d526fdd130095ecdb7bf210809c6cdad8824faa9ac0310ac3cba2aa0523567b2dfa7fe250b30facbd62d4ec99b94ac47c7d3b28f1f6e4c8")] 
IDataReader^ ExecuteReader (
    CommandBehavior behavior
)
/** @attribute StrongNameIdentityPermissionAttribute(SecurityAction.LinkDemand, PublicKey="0024000004800000940000000602000000240000525341310004000001000100272736ad6e5f9586bac2d531eabc3acc666c2f8ec879fa94f8f7b0327d2ff2ed523448f83c3d5c5dd2dfc7bc99c5286b2c125117bf5cbe242b9d41750732b2bdffe649c6efb8e5526d526fdd130095ecdb7bf210809c6cdad8824faa9ac0310ac3cba2aa0523567b2dfa7fe250b30facbd62d4ec99b94ac47c7d3b28f1f6e4c8") */ 
IDataReader ExecuteReader (
    CommandBehavior behavior
)
function ExecuteReader (
    behavior : CommandBehavior
) : IDataReader

參數

  • behavior
    The index of the field for which to retrieve properties.

傳回值

An IDataReader object.

備註

The caller must call the Open method of the Connection property.

When the CommandType property is set to StoredProcedure, the CommandText property should be set to the name of the stored procedure. The command executes this stored procedure when you call ExecuteReader.

The IDataReader supports a special mode that enables large binary values to be read efficiently. For more information, see the "SequentialAccess Setting for CommandBehavior" in your .NET Framework documentation.

While the IDataReader is in use, the associated IDbConnection is busy serving the IDataReader. While in this state, no other operations can be performed on the IDbConnection other than closing it.

執行緒安全性

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

平台

開發平台

如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。

目標平台

如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。

請參閱

參考

IDbCommand Interface
IDbCommand Members
Microsoft.ReportingServices.DataProcessing Namespace