ExecuteReader and large CLOB

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
KLGregor
Posts: 3
Joined: Tue 17 Apr 2012 11:04

ExecuteReader and large CLOB

Post by KLGregor » Tue 26 Jun 2012 14:29

Hello. I have a problem getting big CLOB from procedure.

I have a procedure that returns CLOB data.

Code: Select all

PROCEDURE GET_LNK_SYNC_SERV_ENT_DATA(P_LINK_SYNC_SERV_ENT_ID IN               LINK_SYNC_SERVICES_ENTITIES.ID%TYPE,
                                           P_IS_FULL_SYNC IN INTEGER,
                                           P_XML_DATA OUT CLOB);
I am trying to get it with the next code

Code: Select all

using (OracleConnection oraConnection = new OracleConnection(GetConnectionString()))
            {
                oraConnection.Open();
                OracleCommand oraCommand = new OracleCommand("EL_DIC_SYNC.GET_LNK_SYNC_SERV_ENT_DATA", oraConnection);
                oraCommand.CommandType = CommandType.StoredProcedure;
                oraCommand.Parameters.Clear();
                oraCommand.Parameters.Add("P_LINK_SYNC_SERV_ENT_ID", OracleDbType.Number, 85731, ParameterDirection.Input);
                oraCommand.Parameters.Add("P_IS_FULL_SYNC", OracleDbType.Number, 1, ParameterDirection.Input);
                oraCommand.Parameters.Add("P_XML_DATA", OracleDbType.Clob, ParameterDirection.Output);
                
                using (OracleDataReader oraDataReader = oraCommand.ExecuteReader(CommandBehavior.SequentialAccess))
                {
                    // ...
                }                
            }
but I am getting an exception OutOfMemory on

Code: Select all

oraCommand.ExecuteReader
How can I get big CLOB using OracleDataReader?

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: ExecuteReader and large CLOB

Post by Pinturiccio » Thu 05 Jul 2012 11:26

Currently we do not support output parameters loading without caching. We will investigate the possibility to add such feature, but there is no timeframe.

Post Reply