ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "roberto" <robe...@theaegis.org>
Subject RE: Clarification on usage of Oracle Stored function in IBatis
Date Fri, 28 Jan 2005 05:00:25 GMT
Ok, I don't know the design/history behind your app's database, so what I'm
writing here may be way off base...

Bunch of questions follow:

What currently calls "pkg_refcur.f_refcur(?)"?  

Is it currently being called by another pkg function/proc?  If it is, can
you just call that other function/proc so that it passes in the IN ref
cursor for you and passes back the OUT ref cursor? 

I haven't tried to pass IN a ref cursor from a Java app, but I don't think
it's allowed since I can't figure out where/how the cursor would be closed.
Have you Ask(ed) Tom?...

(time passes)

...And I did a search on Ask Tom and got this (the reply in the 2nd to last
post from the bottom!):


TinyURL if your mail reader chops that link: http://tinyurl.com/4z2tg

Can an oracle.sql.ARRAY (not sure what kind of work would be necessary to
use that with iBATIS) or XML string representation of the data be passed to
the function instead?

If the cursor that is currently being passed into the function is fairly
straightforward, can the following syntax be used instead:

select 'f_refcur' f_refcur from dual order by pkg_refcur.f_refcur( cursor(
select somecol from sometable ) )


> -----Original Message-----
> From: Satya.Neelam@cox.com [mailto:Satya.Neelam@cox.com]
> Sent: Thursday, January 27, 2005 5:55 PM
> To: ibatis-user-java@incubator.apache.org
> Subject: Clarification on usage of Oracle Stored function in IBatis
> Hi,
> We here at Cox Communications use IBatis very extensively.
> Regarding {? = call pkg_refcur.f_refcur(?)}
> where the function returns an (Oracle) REF Cursor and input parameter is
> another cursor type. What would a possible sqlMap definition look like,
> for such a function?
> And....
> How would one call this from within Java?
> Thanks for your help in advance.
> Regards,
> Sairam

View raw message