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

Home -> Community -> Usenet -> c.d.o.misc -> JSQL Support ffor CLOB

JSQL Support ffor CLOB

From: <bberoukhim_at_my-deja.com>
Date: Thu, 24 Jun 1999 23:03:32 GMT
Message-ID: <7kudfu$jsm$1@nnrp1.deja.com>


Please Help!!!!!!!

I am trying to return a CLOB from a stored procedure using SQLJ. Following is the code. I get an exception and program stops. What is wrong.

Here is the SQLJ code.

     CLOB clob;
     long clobLen, readLen;
     String chunk;

// EXCEPTION HAPPENS HERE
     #sql {call SP_PERLTEST_CLOB(:out clob)};

     clobLen = clob.length();

    for (long i = 0; i < clobLen; i+= readLen) {
      chunk = clob.getSubString(i, 10);
      readLen = chunk.length();
      System.out.println("read " + readLen + " chars: " + chunk);
    }

Here is the Stored procedure is, it simply returns a CLOB SP_PERLTEST_CLOB
(lobber OUT clob)
as

        templob clob;
begin

	select doc_text into templob from doc where rownum = 1;
	lobber := templob;

end;

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Thu Jun 24 1999 - 18:03:32 CDT

Original text of this message

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