DbCommand.IDbCommand.ExecuteReader 方法

定义

Connection 执行 CommandText 并生成 IDataReaderExecutes the CommandText against the Connection and builds an IDataReader.

重载

IDbCommand.ExecuteReader()

Connection 执行 CommandText 并生成 IDataReaderExecutes the CommandText against the Connection and builds an IDataReader.

IDbCommand.ExecuteReader(CommandBehavior)

Connection 执行 CommandText,并使用 CommandBehavior 值之一生成 IDataReaderExecutes the CommandText against the Connection, and builds an IDataReader using one of the CommandBehavior values.

IDbCommand.ExecuteReader()

Connection 执行 CommandText 并生成 IDataReaderExecutes the CommandText against the Connection and builds an IDataReader.

 virtual System::Data::IDataReader ^ System.Data.IDbCommand.ExecuteReader() = System::Data::IDbCommand::ExecuteReader;
System.Data.IDataReader IDbCommand.ExecuteReader ();
abstract member System.Data.IDbCommand.ExecuteReader : unit -> System.Data.IDataReader
override this.System.Data.IDbCommand.ExecuteReader : unit -> System.Data.IDataReader
Function ExecuteReader () As IDataReader Implements IDbCommand.ExecuteReader

返回

IDataReader

一个 IDataReader 对象。An IDataReader object.

实现

注解

此成员是显式接口成员的实现。This member is an explicit interface member implementation. 它只能在 DbCommand 实例被强制转换为 IDbCommand 接口时使用。It can be used only when the DbCommand instance is cast to an IDbCommand interface.

有关详细信息,请参阅 ExecuteReaderFor more information, see ExecuteReader.

另请参阅

适用于

IDbCommand.ExecuteReader(CommandBehavior)

Connection 执行 CommandText,并使用 CommandBehavior 值之一生成 IDataReaderExecutes the CommandText against the Connection, and builds an IDataReader using one of the CommandBehavior values.

 virtual System::Data::IDataReader ^ System.Data.IDbCommand.ExecuteReader(System::Data::CommandBehavior behavior) = System::Data::IDbCommand::ExecuteReader;
System.Data.IDataReader IDbCommand.ExecuteReader (System.Data.CommandBehavior behavior);
abstract member System.Data.IDbCommand.ExecuteReader : System.Data.CommandBehavior -> System.Data.IDataReader
override this.System.Data.IDbCommand.ExecuteReader : System.Data.CommandBehavior -> System.Data.IDataReader
Function ExecuteReader (behavior As CommandBehavior) As IDataReader Implements IDbCommand.ExecuteReader

参数

behavior
CommandBehavior

用于指定命令行为的枚举值之一。One of the enumeration values that specifies the command behavior.

返回

IDataReader

一个 IDataReader 对象。An IDataReader object.

实现

注解

此成员是显式接口成员的实现。This member is an explicit interface member implementation. 它只能在 DbCommand 实例被强制转换为 IDbCommand 接口时使用。It can be used only when the DbCommand instance is cast to an IDbCommand interface.

有关详细信息,请参阅 ExecuteReaderFor more information, see ExecuteReader.

另请参阅

适用于