IDbCommand.ExecuteReader(CommandBehavior) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Executes the CommandText against the Connection and builds an IDataReader.
public:
Microsoft::ReportingServices::DataProcessing::IDataReader ^ ExecuteReader(Microsoft::ReportingServices::DataProcessing::CommandBehavior behavior);
public Microsoft.ReportingServices.DataProcessing.IDataReader ExecuteReader (Microsoft.ReportingServices.DataProcessing.CommandBehavior behavior);
abstract member ExecuteReader : Microsoft.ReportingServices.DataProcessing.CommandBehavior -> Microsoft.ReportingServices.DataProcessing.IDataReader
Public Function ExecuteReader (behavior As CommandBehavior) As IDataReader
Parameters
- behavior
- CommandBehavior
The index of the field for which to retrieve properties.
Returns
An IDataReader object.
Remarks
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.