aspose file tools*
The moose likes JDBC and the fly likes Pass hashtable to PL/SQL procedure Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Pass hashtable to PL/SQL procedure" Watch "Pass hashtable to PL/SQL procedure" New topic
Author

Pass hashtable to PL/SQL procedure

Amit Shanker
Greenhorn

Joined: Mar 08, 2003
Posts: 23
How do I pass a Hashtable to a PL/SQL procedure in Oracle 8i ? I know you gotta use STRUCT etc. But a sample code will help.
Thanks.
Cheers, Amit.
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1134

Amit,
Excuse me if I am stating the obvious here, but have you looked at the sample code available from this Web site:
http://technet.oracle.com/sample_code/content.html
And have you searched this Web site:
http://asktom.oracle.com
Hope this helps.
Good Luck,
Avi.
Amit Shanker
Greenhorn

Joined: Mar 08, 2003
Posts: 23
Thanks for you suggestions, Avi.
I visited both these sites and have even downloaded few samples. But the samples do not demonstrate the way to pass a hashtable to PL/SQL stored procedure. The problem is Hashtable is not a compatible type in Oracle. They have to be converted into objects and sent as an object array. I have 13 items to send in the hashtable and converting every item into object and packing them into an array clutters the code. I wanted to see if there was a better mechanism to send a (key,value) pair as a parameter to a PL/SQL procedure from my Java program.
Thanks for your efforts and time.
cheers, Amit.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Pass hashtable to PL/SQL procedure