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 ResultSet from PL/SQL Output?

Java ResultSet from PL/SQL Output?

From: May Nine <may94111_at_yahoo.com>
Date: 30 May 2003 19:26:54 -0700
Message-ID: <275a5824.0305301826.715ef801@posting.google.com>


Hi,

I'm working through some of the http://otn.oracle.com JDBC tutorials.

I'm looking for some JDBC, PL/SQL syntax which implements this idea:

  1. in Java, feed a String[] to a PL/SQL proc call using a combo of... Connection.prepareCall("plsqlProc(?)"), OracleCallableStatement.setARRAY(), OracleCallableStatement.execute()
  2. in Java, have the PL/SQL proc some how return an object which can be easily cast to a ResultSet.

Here is some stuff I know:

I know how to write a simple PL/SQL proc which returns a one column varray or nested table.

I know how to make use of
CallableStatement.getARRAY() to pull this data into a String[].

I know my IDE is telling me that CallableStatement.getResultSet() is a valid method.

My question is, what kind of Oracle object do I have my PL/SQL proc return so that CallableStatement.getResultSet() will work?

My motivation is to transfer something more complex than a simple array across the JDBC-PL/SQL boundry.

-May Nine Received on Fri May 30 2003 - 21:26:54 CDT

Original text of this message

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