I'm using Oracle.ManagedDataAccess 19.6.0 to get some data from Oracle 11g 11.2.0.3.0
This code was working fine until yesterday. 223 rows are getting returned by Oracle. But the while (orclDataReader.Read()) is being skipped, as if there are no rows.
What am I doing wrong? Especially given that this same code has been running fine for at least a week now.
using (OracleDataReader orclDataReader = orclCommand.ExecuteReader())
{
_logger.DebugFormat("{0} rows retreived ", orclDataReader.RowSize);
while (orclDataReader.Read())
{
//do something with rows
//this whole section is being skipped by VS debugger
}
}
OracleConnectionobject is shared for multiple queries executed 1 by 1. There are no threads or processes involved.selectpart in debug mode. Doselect count(*)while leaving everything else same. Take command object and copy out of itConnectionStringproperty, see where you actually connecting. Questions like this always end up being problems like "connected to wrong DB/server". The code you posted does not do anything to point to a problemOracleDataReader.RowSizedoes not give row count! It gives " amount of memory (in bytes) that an OracleDataReader needs to store one row of data for the executed query". Row count probably does not exist in this library. Anyway - bottom line - row count was zero due to logic in the SQL.