I`ve the problems with oracle.sql.ARRAY
Date: Thu, 31 Jan 2002 14:56:20 +0200
Message-ID: <a3bev9$8lh$1_at_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 #. 123071856Received on Thu Jan 31 2002 - 13:56:20 CET