Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 24th, 2003, 01:43 PM
tron's Avatar
tron tron is offline
SwollenMember
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Location: the master control
Posts: 243 tron User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 36 m 22 sec
Reputation Power: 9
Callable Statements

Does anyone know how to pass data (from java) to a pl/sql function/proc which accepts a cursor as an input using a CallableStatement?

Reply With Quote
  #2  
Old March 24th, 2003, 03:44 PM
HowardHyde HowardHyde is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 6 HowardHyde User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I don't know how to do this, or even if it is possible. The last time I tried to find a solution was two years ago.

My alternate approach in the past has been the following:
- Write a java method to Parse a multi-row data set into a pipe delimited String object.
- Write an overloaded PL/SQL method to accept the 'cursor' as a large, single varchar2 parameter.
- Write a utility PL/SQL function to parse the string into the component parts, as needed.

What does the PL/SQL function do? Would it make any sense to allow your java client to manage it on the application tier and simply perform SQL DML statements on the database?

Reply With Quote
  #3  
Old March 24th, 2003, 03:53 PM
tron's Avatar
tron tron is offline
SwollenMember
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Location: the master control
Posts: 243 tron User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 36 m 22 sec
Reputation Power: 9
howard--

thanks for the reply...yea i have not had much luck finding any documentation on this. basically someone created a pl/sql function and defined their own datatype as an input pararmeter (too make things even more complicated ). however the datatype is just a cursor, so i was thinking of starting at square one when i posted this. the goal was to keep the other person from re-writing their pl/sql, however i think it is going to be easiest to ask them to just write another proc to call the function with all of the elements from the cursor (rather than the cursor itself).

no reason to not do the DML in java...just trying to do the least amount of werk

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > Callable Statements


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT