-->
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.  [ 2 posts ] 
Author Message
 Post subject: Executing a Oracle SP with RefCursor as OUT Parameter...
PostPosted: Thu Nov 30, 2006 10:47 am 
Newbie

Joined: Thu Nov 30, 2006 10:34 am
Posts: 2
hi,

I'm trying to return a cursor from a Oracle SP using nhibernate.The following is what the document says to achieve this...

For Oracle the following rules apply:

A function must return a result set. The first parameter of a procedure must be an OUT that returns a result set. This is done by using a SYS_REFCURSOR type in Oracle 9 or 10. In Oracle you need to define a REF CURSOR type, see Oracle literature.


I've created a SP which only returns a cursor using OUT Parameter.This is my nHibernate Configuration...

<sql-query name="GETPatient">
<return class="NHibernatePOB.Patient" >
<return-property name="PatientID" column="Patient_ID" ></return-property>
<return-property name="PatientDesc" column="Patient_DESC"></return-property>
<return-property name="PatientDate" column="STARTDATE"></return-property>
</return>
:ReturnValue = exec getPatient()
</sql-query>

But this doesnt works.Is this mapping correct?Please help to resolve this and let us know whether OUT parameters are supported.

Thanks,
Suresh.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 01, 2006 1:05 am 
Newbie

Joined: Thu Nov 30, 2006 10:34 am
Posts: 2
Any comments?

Thanks,
Suresh.


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