ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Dare" <rd...@comerxia.com>
Subject Calling Oracle Stored Functions:
Date Thu, 16 Dec 2004 20:07:08 GMT

Hi All,

Is there a way to call Oracle functions (not stored procedures)
from iBATIS?

I have iBATIS and Oracle Stored Procedures working without issue
on Oracle 8i.  I have to support some Legacy procedures that are
written as Oracle stored functions.  

When I tried accessing these functions as stored procedures, I 
got an Oracle invalid SQL exceptions:  (tried this with a 
parameterMap, and parameter class with inline mapping with
same results):

    <procedure id="confirmOrder" parameterMap="confirmation_params"
               resultClass="java.lang.Long" >
        { ?=call porders.createconfirmation (?,?,?)} 

I tried accessing the function like this:

    <statement id="confirmOrderStmt"  
            ? := porders.createconfirmation (

The above fails, Oracle complains about unbound parameters.
Changing the ? to #confirmationId# (a field in the resultClass),
results in an "invalid column type" sql exception.  I also tried
some inline mapping as in #confirmationId:mode=OUT#, but that
didn't help.



View raw message