Problem pulling large datasets with OraDirect 4

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Posts: 2
Joined: Fri 19 Jan 2007 00:08

Problem pulling large datasets with OraDirect 4

Post by stoyang » Mon 05 May 2008 18:02

We are experiencing OutOfMemory problems when trying to pull large resultsets from the database. We have a resultset with 145 string columns and about 70,000 records. After 1,260 records we get:

Exception of type 'System.OutOfMemoryException' was thrown.

We were able to pull more records (hundreds of thousands) with fewer columns in the resultset.

Is this a known bug? Any potential fix/workaround? We are using a StoredProcedure to return the resultset. Could that be a problem?

This is a sample code (the eror occurs on reader.Read()):

OracleCommand cmd = new OracleCommand("AppBatchQM.getResultSet", conn);
OracleCursor cursor = (OracleCursor)cmd.Parameters["RETURN_VALUE"].OracleValue;
OracleDataReader reader = cursor.GetDataReader();
int count = 0;
while (reader.Read()) count++;

Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Tue 06 May 2008 11:30

This exception should not be risen.
It's likely a bug in OracleReader when using with a stored procedure.
Could you please check if the following line solves the issue?

OracleCommand.FetchSize = 1000;

Post Reply