0 pts.
 pl/sql ref cursor question
Hi, I'm trying to figure out if this is possible in Java OPTION 1 ================== 1. Obtain a ResultSet by querying a non-oracle database 2. Cast the resultSet into an OracleResultSet 3. Pass the OracleResultSet into a pl/sql stored procedure for processing OPTION 2 ================= 1. Obtain a ResultSet by querying a non-oracle database 2. Cast the resultSet into an oracle ref cursor 3. Pass the ref cursor into a pl/sql stored procedure Any thoughts on how to do this would be greatly appreciated. Thanks.

Software/Hardware used:
ASKED: August 1, 2006  6:11 PM
UPDATED: August 2, 2006  12:22 PM

Answer Wiki:
To give a vague answer to a vague question, probably. It depends, to a large extent, on what type of resultset you're starting with. Check these out for more details. http://www.samspublishing.com/articles/article.asp?p=26251&seqNum=7&rl=1 http://www.csee.umbc.edu/help/oracle8/java.815/a64685/oraext3.htm
Last Wiki Answer Submitted:  August 2, 2006  11:57 am  by  DaveInAZ   0 pts.
All Answer Wiki Contributors:  DaveInAZ   0 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Hi – thanks for the answer. To be a little more clear on the problem i’ve created the following Java pseudocode

String sqlStmtRead = “SELECT COUNT(*) FROM TABLE”;

//DBRes is a class that handles database functions
ResultSet rs = DBres.executeSelectQuery(conn, sqlStmtRead);

//Cast the resultset into an OracleResultSet
OracleResultSet ors = (OracleResultSet)rs;

// THE QUESTION
// Can i obtain a reference to the OracleResultSet ors and
// pass it as a parameter (cursor or record type) to a
// plsql procedure for processing. And if so how would I do
// this.

Thanks!

 0 pts.