Results 1 to 5 of 5
  1. #1
    Shriyans is offline Member
    Join Date
    Jan 2012
    Posts
    3
    Rep Power
    0

    Default JDBC program to invoke stored procedure with complex inputs and output

    Can you please help me writing the JDBC program to call the below stored procedure which is having the complex input type.

    Below is my stored procedure definition


    CREATE OR REPLACE TYPE inputObjects_t AS OBJECT (
    serviceID VARCHAR2(7),
    offerID VARCHAR2(7),
    transactionID NUMBER
    )

    CREATE OR REPLACE TYPE inputArray_t IS VARRAY(100) OF inputObjects_t

    PROCEDURE CheckObjectInput( pCustomerRef IN VARCHAR2,
    pSubscriptionPS IN NUMBER,
    pExpiryObjects IN inputArray_t,
    pTransactionDtm IN DATE,
    pTransactionID IN NUMBER);

    PROCEDURE CheckObjectOutput( pCustomerRef IN VARCHAR2,
    pSubscriptionPS IN NUMBER,
    pExpiryObjects OUT inputArray_t,
    pTransactionDtm IN DATE,
    pTransactionID IN NUMBER);

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,225
    Rep Power
    20

    Default Re: JDBC program to invoke stored procedure with complex inputs and output

    This is the relevant bit of documentation from Oracle.
    Actually, the whole page is probably quite handy.

    Essentially you want a STRUCT to pass in.
    You get a descriptor from the database, using the name of your TYPE, and then build the STRUCT from that and the array of attributes.

    Then you'll want to read about arrays.

  3. #3
    Shriyans is offline Member
    Join Date
    Jan 2012
    Posts
    3
    Rep Power
    0

    Default Re: JDBC program to invoke stored procedure with complex inputs and output

    ThanQ for the reply I will try with the documentation provided.

  4. #4
    Shriyans is offline Member
    Join Date
    Jan 2012
    Posts
    3
    Rep Power
    0

    Default Re: JDBC program to invoke stored procedure with complex inputs and output

    if you have a sample code that would be really helpful for me thanQ in advance.

  5. #5
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,225
    Rep Power
    20

    Default Re: JDBC program to invoke stored procedure with complex inputs and output

    That documentation gives examples.
    There's not anything else I could really add.

    Also, see my comment on OTN re: crossposting.

Similar Threads

  1. Replies: 1
    Last Post: 05-01-2011, 04:53 PM
  2. Debug mySql stored procedure
    By ulix83 in forum NetBeans
    Replies: 0
    Last Post: 10-29-2009, 12:48 PM
  3. Replies: 2
    Last Post: 01-30-2009, 01:53 PM
  4. stored procedure
    By sankarigopi in forum JDBC
    Replies: 1
    Last Post: 11-13-2008, 05:53 PM
  5. How to get multiple rows from Stored Procedure
    By SRJ1957 in forum Advanced Java
    Replies: 0
    Last Post: 08-11-2008, 09:26 PM

Posting Permissions

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