ExecuteReaderAsync(cancellationToken)
This method returns an OracleDataReader
asynchronously.
Declaration
// C# public Task<OracleDataReader> ExecuteReaderAsync(CancellationToken cancellationToken)
Parameters
-
cancellationToken
Token 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.