OracleCommand.ExecuteReader 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.
Sends the CommandText to the Connection and builds an OracleDataReader.
Overloads
ExecuteReader() |
Sends the CommandText to the Connection and builds an OracleDataReader. |
ExecuteReader(CommandBehavior) |
Sends the CommandText to the Connection, and builds an OracleDataReader using one of the CommandBehavior values. |
ExecuteReader()
Sends the CommandText to the Connection and builds an OracleDataReader.
public:
System::Data::OracleClient::OracleDataReader ^ ExecuteReader();
public System.Data.OracleClient.OracleDataReader ExecuteReader();
member this.ExecuteReader : unit -> System.Data.OracleClient.OracleDataReader
override this.ExecuteReader : unit -> System.Data.OracleClient.OracleDataReader
Public Function ExecuteReader () As OracleDataReader
Returns
An OracleDataReader object.
Remarks
When the CommandType property is set to StoredProcedure
, the CommandText property should be set to the name of the stored procedure. The command then executes this stored procedure when you call ExecuteReader.
More than one OracleDataReader can be open at any given time.
See also
Applies to
ExecuteReader(CommandBehavior)
Sends the CommandText to the Connection, and builds an OracleDataReader using one of the CommandBehavior values.
public:
System::Data::OracleClient::OracleDataReader ^ ExecuteReader(System::Data::CommandBehavior behavior);
public System.Data.OracleClient.OracleDataReader ExecuteReader(System.Data.CommandBehavior behavior);
member this.ExecuteReader : System.Data.CommandBehavior -> System.Data.OracleClient.OracleDataReader
override this.ExecuteReader : System.Data.CommandBehavior -> System.Data.OracleClient.OracleDataReader
Public Function ExecuteReader (behavior As CommandBehavior) As OracleDataReader
Parameters
- behavior
- CommandBehavior
One of the CommandBehavior values.
Returns
An OracleDataReader object.
Remarks
If you expect your SQL statement to return only a single row, specifying SingleRow
as the CommandBehavior value may improve application performance.
When the CommandType property is set to StoredProcedure
, the CommandText property should be set to the name of the stored procedure. The command then executes this stored procedure when you call ExecuteReader.
The OracleDataReader supports a special mode that enables large binary values to be read efficiently. For more information, see the SequentialAccess
setting for CommandBehavior.
More than one OracleDataReader can be open at any given time.