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 7707319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T00:19:48+00:00 2026-06-01T00:19:48+00:00

For single output types my code is working fine but I couldn’t get how

  • 0

For single output types my code is working fine but I couldn’t get how to execute Oracle Procedure which has multiple output parameters and what will be the Output i.e ResultSet, Number etc.

 abcProcedure(param1 OUT NUMBER,param2 OUT NUMBER,param3 OUT NUMBER,param4 OUT NUMBER,param5 IN OUT NUMBER, param6 IN NUMBER,param7 IN NUMBER)

Hibernate Code:

 session.doWork(new Work(){

public void execute(Connection connection) throws SQLException {

CallableStatement callableStatement=connection.prepareCall("{call abcProcedure(?,?,?,?,?,?,?)}");


callableStatement.registerOutParameter(registerOutParameter,types.Numeric);

.......
callableStatement.execute();



}
}

Does anyone know how to do that?

  • 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-01T00:19:49+00:00Added an answer on June 1, 2026 at 12:19 am

    Finally I have Solved it myself. Here is the solution

    callableStatement.registerOutParameter(1,types.Numeric); //1   index of Out parameter
    callableStatement.registerOutParameter(2,types.Numeric); //2   index of Out parameter
    callableStatement.registerOutParameter(3,types.Numeric); //3   index of Out parameter
    callableStatement.registerOutParameter(2,types.Numeric); //4   index of Out parameter
    callableStatement.registerOutParameter(5,types.Numeric); //5   index of Out parameter
    callableStatement.setLong(5, (Long)value); // 5 is also  input parameter
    callableStatement.setLong(6, (Long)value); // 6    input parameter
    callableStatement.setLong(7, (Long)value); // 7    input parameter
    callableStatement.execute();
    callableStatement.getLong(1);// out put for param1 
    callableStatement.getLong(2);// out put for param2
    callableStatement.getLong(3);// out put for param3
    callableStatement.getLong(4);// out put for param4
    callableStatement.getLong(5);// out put for param5
    

    In case of multiple resultsets

    callableStatement.getResultSet(); // will get the first ResultSet
    callableStatement.getMoreResults();// will point to the next ResultSet
    callableStatement.getResultSet();// will get the second ResultSet
    ..... So on
    

    Thats it. 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a single entry output from a paradox table which is imported into
I have a very simple application which currently has a single Linq to Sql
A single data structure to store different types in a single variable. Not asking
I have the following code in a view: def controller_details(request, object_id): controller = Controller.objects.get(pk=object_id)
I am using a generic approach to receiving a single row from any Oracle
Is it possible to feed an array of image names into code which converts
This is my image upload code and the header isn't working, it stays on
There is a list which I would like to output into an excel file
I want to output a single line of text to the browser that contains
I am working on a simple console app to get my feet wet with

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.