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

Home -> Community -> Usenet -> c.d.o.tools -> Problem with JDBC and LONG datatype

Problem with JDBC and LONG datatype

From: Jaroslaw Jurowicz <jurowicz_at_omicron.comarch.pl>
Date: 2000/05/02
Message-ID: <8ebtqv$kcm$1@orion.comarch.pl>#1/1

Hello

I've a problem - when i try to obtain data from LONG using JDBC i always get "java.lang.ArrayIndexOutOfBounds Exception", I've tried everything and I don't now why. Please help.

Sample piece of code ilustrating the problem:

////////////////////////////////////////////////////////////////////////////
/////////////////

   OracleCallableStatement Stmt =
(OracleCallableStatement)Conn.prepareCall("{call ReadTemplate(?,?,?,?,?,?)}");

    ..................
   Stmt.registerOutParameter(4, OracleTypes.CURSOR);
    .................

   Stmt.execute();
   OracleResultSet rs = (OracleResultSet)Stmt.getCursor(4);     InputStream Stream;
    java.io.BufferedReader BufferStream;     String line;
    if ( rs.next() )
    {
     Stream = rs.getUnicodeStream( "SZB_SZABLON" );
     BufferStream = new java.io.BufferedReader( new
nputStreamReader( Stream ) );
     while ( (line = BufferStream.readLine()) != null )
     {
       System.out.println(line);
     }

    }
/////////////////////////////////////////////////////////////////

The exception is thrown when first BufferStream.readLine() is executed. I've tried getCharacterStream, getBinaryStream, getBytes - nothing.

I'm using Win NT, jdk 1.2.2, Oracle 8i

I'm sorry for my English, I'm still learning.

Regards
Jarek Received on Tue May 02 2000 - 00:00:00 CDT

Original text of this message

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