March 24th, 2003, 02:43 PM
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?
March 24th, 2003, 04:44 PM
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?
March 24th, 2003, 04:53 PM
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