-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Oracle Stored Procedure - Multiple OUT parameters
PostPosted: Thu May 07, 2009 11:31 am 
Newbie

Joined: Thu May 07, 2009 10:44 am
Posts: 1
We use custom Oracle Stored procedure to insert/update tables, the Stored procedure returns 3 out parameters:

PROCEDURE SP_ADDR_PURPOSE (
I_APP_CD IN VARCHAR2,
I_PURPOSE IN VARCHAR2,
I_DESC IN VARCHAR2
I_MAX_NUM IN NUMBER
I_UPDATABLE_BY_OTHER IN VARCHAR2
I_RETENTION_DT IN VARCHAR2
I_REC_STATUS IN VARCHAR2
I_UPD_USER IN VARCHAR2,
O_PAP_PURPOSE_ID OUT NUMBER,
O_RESULT OUT VARCHAR2,
O_MSG OUT VARCHAR2
);

The nativeQuery is:
@NamedNativeQuery(name="setUpPurpose", query="call PK_PERS_ADDRESS.SP_ADDR_PURPOSE( ?, " +
" :I_APP_CD, :I_PURPOSE, :I_DESC, :I_MAX_NUM, :I_UPDATABLE_BY_OTHER, :I_RETENTION_DT, " +
" :I_REC_STATUS, :I_UPD_USER)")

The question is: How should I register these out parameters O_PAP_PURPOSE_ID , O_RESULT, O_MSG?

In DAO:

Query query = getSession().getNamedQuery("setUpPurpose")
.setParameter("I_APP_CD", applicationAddressPurpose.getApplication().getApplicationCode())
.setParameter("I_PURPOSE", applicationAddressPurpose.getPurpose().getPurposeType())
.setParameter("I_DESC", applicationAddressPurpose.getPurpose().getDescription())
.setParameter("I_MAX_NUM", applicationAddressPurpose.getPurpose().getMaxNumber())
.setParameter("I_UPDATABLE_BY_OTHER", applicationAddressPurpose.getPurpose().getIsUpdateble())
.setParameter("I_RETENTION_DT", applicationAddressPurpose.getPurpose().getRetentionDate())
.setParameter("I_REC_STATUS", "A")
.setParameter("I_UPD_USER", applicationAddressPurpose.getAddUser());


Any help will be appreciated.


Top
 Profile  
 
 Post subject: Re: Oracle Stored Procedure - Multiple OUT parameters
PostPosted: Tue Aug 11, 2009 11:21 am 
Newbie

Joined: Tue Aug 11, 2009 11:18 am
Posts: 1
I have the same problem - did you ever get a solution working?


Top
 Profile  
 
 Post subject: Re: Oracle Stored Procedure - Multiple OUT parameters
PostPosted: Mon May 31, 2010 10:01 pm 
Newbie

Joined: Mon Aug 24, 2009 11:34 am
Posts: 2
I have the same problem - did you ever get a solution working?
please, let me know if you have hibernate solution for that.
I am currently doing it through jdbc.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.