Sure: Oracle 9i 9.2.0.3 Thin Driver 1.4.2_06
On Wed, 22 Dec 2004 15:14:25 -0500, Jerome Jacobsen <[EMAIL PROTECTED]> wrote: > Hi Kris, > > Do you mind posting your TypeHandlerCallback? > > Also, which versions of thee following have you tested this with? > - Oracle Server > - JDBC driver > - JRE > > I'm considering moving some of my queries into stored procedures so this > technique is of interest to me. > > Thanks, > -Jerome > > > -----Original Message----- > > From: Kris Schneider [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, December 22, 2004 2:06 PM > > To: [email protected]; [EMAIL PROTECTED] > > Subject: Re: Problems with registering OUT parameter in Oracle stored > > procedure > > > > > > This seems to be working for me: > > > > <sqlMap> > > > > <parameterMap id="noInputsSingleResult" class="map"> > > <parameter property="resultCode" > > jdbcType="NUMERIC" > > mode="OUT"/> > > <parameter property="result" > > jdbcType="ORACLECURSOR" > > mode="OUT" > > > > typeHandler="com.dotech.ibatis.ResultSetToResultHandler"/> > > </parameterMap> > > > > <procedure id="proc1" parameterMap="noInputsSingleResult"> > > <![CDATA[ > > {?= call proc1(?)} > > ]]> > > </procedure> > > > > <procedure id="proc2" parameterMap="noInputsSingleResult"> > > <![CDATA[ > > {?= call proc2(?)} > > ]]> > > </procedure> > > > > </sqlMap> > > > > I've implemented a custom TypeHandlerCallback that converts the > > ResultSet into a javax.servlet.jsp.jstl.sql.Result, but that's just a > > detail of what I need to do with it... > > > > On Wed, 22 Dec 2004 08:28:55 -0700, Clinton Begin > > <[EMAIL PROTECTED]> wrote: > > > Ref cursors are not supported. They can be implemented with a custom > > > type handler, but not for an output parameter. Try using > > > jdbcType="OBJECT" and javaType="java.lang.Object". > > > > > > Clinton > > > > > > On Tue, 21 Dec 2004 16:36:19 -0000, Dooley, Liam > > > <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > > > > > Has anyone successfully executed an Oracle stored procedure > > that returns a result set with multiple columns using ibatis? > > > > We have a stored procedure that returns a result set which > > contains data for populating a custom object. This result set is > > returned as a REFCURSOR and so needs to be registered as an OUT > > parameter of type oracle.jdbc.driver.OracleTypes.CURSOR by > > ibatis?, but it's not clear to me how to achieve this. > > > > Does anybody know if ibatis can handle this scenario and if > > so how would i implement it? > > > > > > > > This is the current configuration which gives the following > > error ("--- Check the output parameters (register output > > parameters failed). > > > > --- Cause: java.sql.SQLException: Invalid column type"): > > > > > > > > <parameterMap id="customerDetailsByIdParams" class="map"> > > > > <parameter property="applicantDetails" > > javaType="ApplicantDetails" mode="OUT"/> > > > > <parameter property="foNumber" jdbcType="NUMERIC" > > javaType="long" mode="IN"/> > > > > <parameter property="roleType" jdbcType="VARCHAR" > > javaType="java.lang.String" mode="IN"/> > > > > </parameterMap> > > > > > > > > <procedure id="getCustomerDetailsById" > > resultMap="customerDetailsByIdResult" > > parameterMap="customerDetailsByIdParams"> > > > > { CALL ? := > > PKCO_01_BCUS_DETAILS_GET.bcus_details_get(?,?) } > > > > </procedure> > > > > -- > > Kris Schneider <mailto:[EMAIL PROTECTED]> -- Kris Schneider <mailto:[EMAIL PROTECTED]>
ResultSetToResultHandler.java
Description: Binary data

