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 -> Java Stored procedure and CLOB Data Type

Java Stored procedure and CLOB Data Type

From: Gerald <dbyte32_at_gmail.com>
Date: 26 Apr 2006 16:06:39 -0700
Message-ID: <1146092799.361284.143020@u72g2000cwu.googlegroups.com>


I'm using a Java Stored procedure to do some processing in a Oracle 9i database. The Java Stored Procedure takes several string parameters. The Java Stored Procedure returns string data to the calling PL/SQL Procedure.

  I have the modifiable parameter mapped to a VARCHAR2. VARCHAR2 has a size limit of 32767kb. The String datatype has no size limit and the data that is collecting to return is getting quick large that it will eventually exceed the limits of the VARCHAR2 datatype. What I want to know is, is it possible to associate the String data type with a CLOB in the declaration of the PL/SQL wrapper for the JSP? If so, how is this done. My current attempts to use the CLOB or long have not been successful.

example

            procedure example1(varchar2, varchar2) as language java
                  name 'myclass.getData(String, String[])';


Java Stored Procedure
        public class myclass {

             getData(String p1, String[] p2) {
                  //  do some stuff

                  p2[0] = "DATA";
       }

What I would like to do is use a CLOB datatype instead of a varchar2

            procedure example1(varchar2, clob) as language java
                  name 'myclass.getData(String, String[])';

My work around is to save the string data to a CLOB column in the JSP and have the calling stored procedure retrive the value from the CLOB column when it returns from the JSP.

Thanks in advance

     Gerald Received on Wed Apr 26 2006 - 18:06:39 CDT

Original text of this message

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