How do you call them from JDBC directly?
Can you call the function from a procedure in oracle? There may be an
easier way, but it seems like this would be an immediate option for you.
Larry
>>> "Robert Dare" <[EMAIL PROTECTED]> 12/16/04 1:07 PM >>>
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 (?,?,?)}
</procedure>
I tried accessing the function like this:
<statement id="confirmOrderStmt"
parameterClass="OrderConfirmation"
resultClass="java.lang.Long">
[CDATA[
begin
? := porders.createconfirmation (
#orderId#,
#vendorId#,
#vendorOrderId#);
end;
]]
</statement>
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.
Regards,
Rob.