Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Pass hashtable to PL/SQL procedure

 
Amit Shanker
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic