Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> I`ve the problems with oracle.sql.ARRAY

I`ve the problems with oracle.sql.ARRAY

From: Матвиенко Родион <rodion_at_mail.pol03.gts.lg.ua>
Date: Thu, 31 Jan 2002 14:52:59 +0200
Message-ID: <a3bep1$8k3$1@engine.gts.lg.ua>


Help who can!!!

There is a problem with return from the JAVA function in the block PL/SQL oracle.sql. ARRAY.

#import java.util.*;
#import java.sql.*;
public class Utility{

   public static oracle.sql.ARRAY getANY(){

        oracle.sql.ARRAY result=null;
        Connection conn=new
oracle.jdbc.driver.OracleDriver().defaultConnection();
        oracle.sql.ArrayDescriptor
ad=oracle.sql.ArrayDescriptor.createDescriptor("SCOTT.CVECTOR",conn);
         ....
        Vector vals=new Vector();
        for(...){
           ....
           vals.add(new String("insert ..."));
        }
        Object[] as=new Object[vals.size()];
        for(int i=0;i<vals.size();i++)
           as[i]=(String)vals.elementAt(i);
        if(vals.size()>0)
           result=new oracle.sql.ARRAY(ad,conn,as);
        return result;

   }

}

in Oracle the type is created

> create or replace type CVector as table of varchar2(2000);

and framing function of PL/SQL
> create or replace function getANY() return CVector as language java name
'uoi.oracle.dead.Utility.getANY() return oracle.sql.ARRAY';

Problem in that if I return the array of strings common length (power) which is exceeded 1Kbytes - the error of closing of the channel is caused ORA-03113. End-of-file on communication channel.

My mind is not been apply what to make! Can there are any initializing parameters the systems which allow to solve this problem.

I`ve under Windows 2000 the Oracle 8.1.7 .

--
Yours faithfully Rodion Matvienko
ICQ #. 123071856
Received on Thu Jan 31 2002 - 06:52:59 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US