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 -> How to retrieve data from an Oracle TABLE type in JSP CallableStatement

How to retrieve data from an Oracle TABLE type in JSP CallableStatement

From: Per Magnus L?vold <kebabkongen_at_hotmail.com>
Date: 1 Apr 2005 06:39:09 -0800
Message-ID: <ba788e86.0504010639.f11e705@posting.google.com>


Hi!
I have trouble calling a plsql function from a JSP. The plsql function returns data as a Oracle TABLE type, and I don't know how to handle this type in Java.

The table returned is declared as follows: CREATE OR REPLACE
type xxnm_tilgj_res_table as table of xxnm_tilgjengelighets_res; /

I call the procedure from JSP using a CallableStatement:

java.sql.CallableStatement stmt1 = xxnmconn.prepareCall("{? = call xxnm_sjekk_tilgjengelighet.sjekk_handlevogn(?, ?) }");       

stmt1.registerOutParameter(1,
oracle.jdbc.driver.OracleTypes.PLSQL_INDEX_TABLE);

stmt1.setString(2,'test'); /* setter parametre */
stmt1.setString(3,141); /* setter parametre */
stmt1.execute();

It seems as if OracleTypes.PLSQL_INDEX_TABLE not is correct, or perhaps it is impossible to handle an Oracle TABLE type from a CallableStatement?

Any help is very much apreciated!

Regards, Per Magnus Received on Fri Apr 01 2005 - 08:39:09 CST

Original text of this message

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