#1
  1. SwollenMember
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Location
    the master control
    Posts
    264
    Rep Power
    14

    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?
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    6
    Rep 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?
  4. #3
  5. SwollenMember
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Location
    the master control
    Posts
    264
    Rep Power
    14
    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

IMN logo majestic logo threadwatch logo seochat tools logo