This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am developing a java stored procedure and i want to load it into oracle using the loadjava command line, however inside the method of the procedure I use some classes that are obrained from a jar file, how can I include the .jar file into the class-path of oracle ??
in addition one of the arguments of the java method is ResultSet do you know to which oracle type it should be mapped, or if there is any other alternatives for using the ResultSet ??
1) in pl/sql i do a select into statement and put the data in an appropriate type.
2) then i want to call my Java Stored Procedure passing it the data i retrieved, ( which should be mapped to a ResultSet in Java or something else don't know).
3) finally in the Java Stored Procedure I handle the data i received.
for now the only workaround is that i don't pass the data, i just pass a String containing the Query to execute, and i create a PreparedStatment in my Java Stored Procedure and execute this query, and obtain the ResultSet from it, however i think its not very good.
I have read around how to return a ResultSet from a Java Stored Procedure, but nothing talking about how to pass it as an argument, I have seen that the java.sql.Array interface has a method getResultSet, but I didn't understand how i could put the result of a select query into an object of type ARRAY or VARRAY
any help would be appreciated. Thanks.
p.s. I am using Oracle 10g, and Java 1.4
Omar Al Kababji - Electrical & Computer Engineer
[SCJP - 90% - Story] [SCWCD - 94% - Story] [SCBCD - 80% - Story] | My Blog
Omar Al Kababji
Joined: Jan 13, 2009
Ok for the jars it was simple i just used the same command loadjava to load the needed jar files. however i am still blocked with the REF CURSOR --> ResultSet mapping, which is needed as a method parameters.