Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7846543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T17:36:57+00:00 2026-06-02T17:36:57+00:00

I have a record type and a procedure (which recieves as IN parameter a

  • 0

I have a record type and a procedure (which recieves as IN parameter a table of records) defined in a PL/SQL package
How can this procedure be called within Java code?

Is it better to avoid this type of IN parameters? maybe a REF CURSOR?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T17:36:58+00:00Added an answer on June 2, 2026 at 5:36 pm

    The usual whay is to use a temporary table.

    0 Set autocommit off if nessesary (It’s off by default)

    1 Fill a temporary table whith some values.

    2 Call your procedure. Read a values from temporary table. (No records in IN parameters)

    3 commit

    //A function to put a value in temporary table
    public void addValueToTmp(Connection conn, String value)  throws NamingException, SQLException {
      CallableStatement cs = conn.prepareCall("{call plsql_function_put_value_in_tmp(?)}");
      ....... other code .......
      ....... other code .......
      ....... other code .......
    }
    
    //A function to do something whit a data in temporary table
    public void doAllWork(Connection conn)  throws NamingException, SQLException {
      CallableStatement cs = conn.prepareCall("{call plsql_function_do_something_whith_tmp}");
      ....... other code .......
      ....... other code .......
      ....... other code .......
    }
    
    
    public void mainFunction() throws NamingException, SQLException {
      ....... other code .......
      //Get connection
      Connection conn = anyFunctionToGetConnection();
      //Fill temporary table
      addValueToTmp(conn, value1);
      addValueToTmp(conn, value2);
      addValueToTmp(conn, value3);
      //Do something whith data
      doAllWork(conn);
      //Commit
      conn.commit;
      ....... other code .......
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Lets say have this immutable record type: public class Record { public Record(int x,
I have a delphi programm which send record: type TMyNetworkPckg = record za: byte;
I have an XML document which looks something like this: <meadinkent> <record> <comp_div>MENSWEAR</comp_div> <sty_ret_type>ACCESSORIES</sty_ret_type>
I think this hasn't been answered before. I have a stored procedure which enters
I have this recommendations table: Table public.recommendations Column | Type | Modifiers -----------------------+-----------------------------+-------------------------------------------------------------- id
I have a C code which records a procedure address in an array void*
I'm using LINQ to SQL and I have a stored procedure which brings back
If I am trying to call a procedure which has a record type (not
I have a very simple stored procedure which returns multiple record sets. All of
I have a trigger which executes after a record is inserted into a table.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.