Results 1 to 2 of 2

Thread: Calling stored procedure with a table as argument

  1. #1
    Join Date
    Aug 2004
    Posts
    2

    Default Calling stored procedure with a table as argument

    Hi,

    Working with Oracle we have the following SQL:

    TYPE person AS OBJECT (
    id NUMBER,
    name VARCHAR(240)
    );

    TYPE person_tab AS TABLE OF person;

    PROCEDURE save_persons(persons IN person_tab);


    It is possible to access such a declaration through Spring?

    Reading the manuals and searching the web we found only one relevant post. This dealt with accessing a stored procedure that returned an Oracle object.

    We are pretty sure that a similar approach is possible for an in parameter,
    but exacly how should it be done? It is not just the opposite direction (in instead of out), but also a table of such objects.


    Regards,

    Ricardo M.

  2. #2
    Join Date
    Aug 2004
    Posts
    1,110

    Default

    Look at the org.springframework.jdbc.core.SqlTypeValue class. It has a callback method
    Code:
    setTypeValue(PreparedStatement ps, int paramIndex, int sqlType, String typeName) throws SQLException;
    that should let you create the table and set it using regular Oracle JDBC constructs.
    Thomas Risberg
    SpringSource by Pivotal
    http://www.springsource.org

Similar Threads

  1. Replies: 11
    Last Post: Sep 11th, 2006, 05:47 AM
  2. could not satisfy dependencies
    By springuser in forum Container
    Replies: 4
    Last Post: Apr 26th, 2005, 01:15 PM
  3. Replies: 1
    Last Post: Apr 25th, 2005, 07:37 PM
  4. Replies: 1
    Last Post: Dec 23rd, 2004, 02:07 PM
  5. Error on calling stored procedure
    By Bill Pearce in forum Data
    Replies: 5
    Last Post: Oct 25th, 2004, 09:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •