You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by bhaarat Sharma <bh...@gmail.com> on 2007/12/02 17:01:37 UTC
Oracle stored procs returning multiple cursors
Hello,
Can someone please show a sample resultMap xml file which retrieves data
from oracle stored procs?
I have stored procs which return multiple resultsets (cursors). Does iBatis
have a builtin datatype for oracle cursor types?
Thanks!
--
-bhaarat
Re: Oracle stored procs returning multiple cursors
Posted by PONSON <ma...@yahoo.co.in>.
Hi,
Following is the xml file format,
-----------------------------
<sqlMap namespace="SalesCalendars">
<parameterMap id="setArrayGetRefCursorMap" class="map" >
<parameter property="output1" jdbcType="ORACLECURSOR" mode="OUT"/>
</parameterMap>
<procedure id="set2DArrayGetRefCursor"
parameterMap="setArrayGetRefCursorMap">
{ call scott.set2DArrayGetRefCursor(?) }
</procedure>
</sqlMap>
------------------------------
The java code is,
------------------------------
Map map = new HashMap();
getSqlMapClientTemplate().queryForObject("set2DArrayGetRefCursor", map);
OracleResultSetImpl resultSet = (OracleResultSetImpl) map.get("output1");
while (resultSet.next()) {
System.out.println(resultSet.getString(1));
}
resultSet.close();
----------------------------------
omnipresent wrote:
>
> Hello,
>
> Can someone please show a sample resultMap xml file which retrieves data
> from oracle stored procs?
>
> I have stored procs which return multiple resultsets (cursors). Does
> iBatis
> have a builtin datatype for oracle cursor types?
>
> Thanks!
>
> --
> -bhaarat
>
>
:-):-):-):-/:-(
--
View this message in context: http://www.nabble.com/Oracle-stored-procs-returning-multiple-cursors-tp14116818p14248313.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.