ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amit Kushwaha <blue...@googlemail.com>
Subject Re: REF CURSOR - DB2
Date Tue, 13 Feb 2007 17:42:55 GMT
A'ha. Thanks.

Jeff Butler wrote:
> When DB2 returns a result set from a stored proc, it is not as an 
> output parameter.  It's just like the result set returned from a 
> select statement.  So you don't declre an out parameter for the result 
> set, you just use a result map.
>  
> <procedure id="statementName" parameterClass="long", resultMap="product">
>     { call ProcName(#id#) }
> </procedure>
>  
>  
> Jeff Butler
>
>
>  
> On 2/13/07, *Amit Kushwaha* <bluenex@googlemail.com 
> <mailto:bluenex@googlemail.com>> wrote:
>
>     Jeff,
>
>     Right. DB2 stored procs, that returns back a result set.
>
>     Do you need to specify the jdbcType on the output parameter that is a
>     resultset?
>
>     For ex, in the /<REFCURSOR> /below,
>
>     <resultMap id="product" class="Product">
>        <result property="name"  columnIndex="1"/>
>        <result property="description"  columnIndex="2"/>
>     </resultMap>
>
>
>     <procedure id="statementName" parameterClass="long">
>         { call #output, javaType="java.sql.ResultSet".
>     jdbcType=/<REFCURSOR>/, mode=OUT, resultMap=product#
>                                                              =
>     ProcName(#runtimeCode, jdbcType=INTEGER, mode=OUT#
>
>     ,#id#) }
>     </procedure>
>
>
>     Amit
>
>     Jeff Butler wrote:
>     > DB2 doesn't implement the idea of a ref cursor.  What feature of
>     DB2
>     > are you trying to use?
>     >
>     > Jeff Butler
>     >
>     >
>     >
>     > On 2/13/07, *Amit Kushwaha* <bluenex@googlemail.com
>     <mailto:bluenex@googlemail.com>
>     > <mailto: bluenex@googlemail.com
>     <mailto:bluenex@googlemail.com>>> wrote:
>     >
>     >     Hi,
>     >
>     >     Just checking,
>     >    
>     http://opensource.atlassian.com/confluence/oss/display/IBATIS/Oracle+REF+CURSOR+Solutions
>     <http://opensource.atlassian.com/confluence/oss/display/IBATIS/Oracle+REF+CURSOR+Solutions>
>     >
>     >     What if the database is DB2? Are DB2 versions of ref cursor's
>     >     supported?
>     >
>     >     Regards,
>     >
>     >     Amit
>     >
>     >
>     >
>
>


Mime
View raw message