Page 1 of 1

ExecuteReader and large CLOB

Posted: Tue 26 Jun 2012 14:29
by KLGregor
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?

Re: ExecuteReader and large CLOB

Posted: Thu 05 Jul 2012 11:26
by Pinturiccio
Currently we do not support output parameters loading without caching. We will investigate the possibility to add such feature, but there is no timeframe.