-->
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.  [ 4 posts ] 
Author Message
 Post subject: call a function
PostPosted: Wed Dec 02, 2009 7:33 am 
Newbie

Joined: Wed Dec 02, 2009 7:31 am
Posts: 4
<sql-query name="sqlcondition" callable= "true">
<return-scalar column="zeroornot" type="long"/>
{ ? = call FPI_UI_UTILS_PKG.check_fpi_deals_where_cond(?, ?) }
</sql-query>

FPI_UI_UTILS_PKG.check_fpi_deals_where_cond(?, ?)
first function takes parameter, second is out argument.
how can i work this out? also it returns a number which should be stored in zeroornot?


the second parameter is out parameter
how to retreive out parameters?


Top
 Profile  
 
 Post subject: Re: call a function
PostPosted: Wed Dec 02, 2009 7:40 am 
Newbie

Joined: Wed Dec 02, 2009 7:31 am
Posts: 4
FPI_UI_UTILS_PKG.check_fpi_deals_where_cond takes two parameters. second is out parameter

it also returns a number


Top
 Profile  
 
 Post subject: Re: call a function
PostPosted: Wed Dec 02, 2009 12:20 pm 
Newbie

Joined: Wed Dec 02, 2009 7:31 am
Posts: 4
bump


Top
 Profile  
 
 Post subject: Re: call a function
PostPosted: Thu Dec 03, 2009 8:52 am 
Newbie

Joined: Wed Dec 02, 2009 7:31 am
Posts: 4
{ ?= call FPI_UI_UTILS_PKG.check_fpi_deals_where_cond(?,?)}


SessionFactory HibernateSupport = new Configuration().configure() .buildSessionFactory();
Session s = HibernateSupport.openSession();
String gregor ="mesg"
Query q = s.getNamedQuery("getSummary");;
// q.setString("krikor");
q.setParameter(1,gregor );
q.setParameter(2,gregor);
q.registerOutParameter(1, java.sql.Types.TINYINT);
List l = q.list();

can someomne help?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.