A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
Arduino in Action
this week in the
General Computing
forum!
A special promo:
Enter your blog post or vote on a blogger to be featured in an upcoming Journal
JavaRanch
»
Java Forums
»
Databases
»
JDBC
Author
passing a array of values froms oralce
snebe snebe
Greenhorn
Joined: Aug 12, 2001
Posts: 1
posted
Aug 13, 2001 14:25:00
0
How do i get back array of values from oracle stored procedure?
For eg;I want five columns from a table and it has many rows i need to put it into the array and pass it back to
jdbc
call.How do i do it?
Thanks,.
--snebe
Jamie Robertson
Ranch Hand
Joined: Jul 09, 2001
Posts: 1879
I like...
posted
Aug 13, 2001 15:11:00
0
why not return the resultset itself(or ref cursor in oracle?)
example:
// Prepare a PL/SQL call CallableStatement call = conn.prepareCall ("{ ? = call java_refcursor.job_listing (?)}"); // Find out all the SALES person call.registerOutParameter (1, OracleTypes.CURSOR); call.setString (2, "SALES"); call.execute (); ResultSet rset = (ResultSet)call.getObject (1); //...process rset...
taken from:
http://developer.novell.com/ndk/doc/samplecode/jdbc_sample/oci7/RefCursorExample.java.html
hope this was helpful,
Jamie
I agree. Here's the link:
http://zeroturnaround.com/jrebel
- it saves me about five hours per week
subject: passing a array of values froms oralce
Similar Threads
Converting an array to a Vector -> Simple question with many doubts
Passing objects w/ JNI
Is this a limitation of JSP ?- I can do it in ASP
Object casting
Enhanced Loop
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter