-->
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: Ref cursor in stored proc
PostPosted: Thu Apr 14, 2005 8:33 am 
Newbie

Joined: Thu Apr 14, 2005 8:21 am
Posts: 5
Can I map the oracle stored proc with ref cursor as one of it's parameters? something like this:


Code:
procedure a(v in number, i in number, l out number, c out ref cursor )
is
begin
...
  open c for
    select a1,a2,a3,a4 from ...
...
end


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 14, 2005 12:46 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
no out parameters is not supported - it should be the return value.

I would assume you could solve that issue by simply wrapping it and return the out parameter.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 18, 2005 6:47 am 
Newbie

Joined: Thu Apr 14, 2005 8:21 am
Posts: 5
hmmm. This is the problem. There are a lot of stored proc with multiple out parameters. And i have no idea how to write a function with multiple returns))). The only way is refactoring of SQL(but this can take a lot of time - problem too), isn't it?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 18, 2005 7:09 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
yes I know its tricky, but since it require us to access the statement to get the values it is not possible at the moment.

I've never really understood why out parameters are done on the statement and not the resultset...its a nice mismatch ,)

/max

_________________
Max
Don't forget to rate


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.