| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> JSQL Support ffor CLOB
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
![]() |
![]() |