ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Clinton Begin" <clinton.be...@gmail.com>
Subject Re: ORA-06572: Function has OUT parameters
Date Thu, 11 Sep 2008 14:43:04 GMT
Try this, if it's too much to put in your SQL, you can use an external
parameter map.

#in,jdbcType=VARCHAR,mode=OUT#,
#out,jdbcType=VARCHAR,mode=OUT#

Clinton


On Thu, Sep 11, 2008 at 7:09 AM, Vadim <deadmoro3@gmail.com> wrote:
> Hello,
>
> I've been thinking how to do this for too long now. Ibatis version is
> 2.1.0.565, Oracle version is 9. What I'm trying to do is map a statement to
> a Java class and get one varchar OUT parameter. PL/SQL function is like
>
> function with_out (
>     in_param     in varchar2,
>     out_message    out varchar2
> ) return some_type;
>
> TYPE some_type
>  AS TABLE OF some_object
>
> TYPE SOME_OBJECT as object (
>     id            number(9),
>     class  varchar2(16)
> );
>
> class SomeClass{
> [id, class] setters, getters (as usual)
> }
>
> <select id="someSelect"
>        resultClass="SomeClass">
>
>         SELECT  id, class
>         FROM TABLE(with_out (#in:VARCHAR#,#out:VARCHAR#) )
> </select>
>
> IbatisDatastore.getSqlMapInstance().queryForList("someSelect", paramMap);
>
> That's what I have now and what gives me a 'Function has an OUT parameter'
> error. One solution I see is changing function to procedure and adding one
> more out parameter. Unfortunately, I'm not familiar with Ibatis enough to be
> able to map 'some_type' OUT parameter to 'SomeClass'.
> Would be grateful for any advice you can give!
>
>

Mime
View raw message