ExecuteReaderAsync(commandBehavior, cancellationToken)
This method returns an OracleDataReader asynchronously.
Declaration
// C# public Task<OracleDataReader> ExecuteReaderAsync(CommandBehavior commandBehavior, CancellationToken cancellationToken)
Parameters
-
commandBehaviorThis argument is ignored. The
CommandBehavior.CloseConnectionvalue is used. -
cancellationTokenToken to cancel async call.
Remarks
Since OracleDataReader relies on an open connection to fetch data, ODP.NET does not close the connection after ExecuteReader() returns.
ODP.NET sets the CommandBehavior to CommandBehavior.CloseConnection. As a result, the connection is closed once the reader is closed.