I have noticed that if I change the FetchSize on the command object to 1 then I do indeed get the error, but I should be able to set the FetchSize to 200 and still get the ORA-01427 error.
If I use the Oracle Data Provider for .NET from oracle it does throw the ORA-01427 error.
Code: Select all
OracleConnection con = null;
OracleCommand cmd = null;
OracleDataReader rdr = null;
int counter = 0;
try
{
con = new OracleConnection(connectionString);
con.Open();
cmd = new OracleCommand(query, con);
cmd.CommandTimeout = 20;
rdr = cmd.ExecuteReader();
while (rdr.Read())
{
Console.WriteLine(++counter);
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}