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 <[EMAIL PROTECTED]> 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* <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>     Hi,
>
>     Just checking,
>
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
>
>
>


Reply via email to