Thanks a lot Ron, But I have still the same error. I don't understand my problem. Have you already used Ibatisnet with oracle stored procedure ?
Cheers Jean-Guillaume LALANNE -----Message d'origine----- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] org] De la part de Ron Grabowski Envoyé : lundi 24 janvier 2005 14:00 À : ibatis-user-cs@incubator.apache.org Objet : Re: Oracle Stored Procedure and Ibatisnet Maybe Oracle's NUMBER cannot be converted to a System.Int32. What happens if you change your resultClass to "System.Decimal"? --- Jean Guillaume LALANNE <[EMAIL PROTECTED]> wrote: > Hi, > > > > I am trying to use the following Oracle Stored Procedure with > IbatisNet: > > > > CREATE OR REPLACE FUNCTION DT_WIMB_INSERTHTTPREQUEST > > ( > > BROWSER IN TWIMB_HTTPREQUEST.HTTPREQUEST_BROWSER%TYPE, > > IP IN TWIMB_HTTPREQUEST.HTTPREQUEST_IP%TYPE, > > RTYPE IN TWIMB_HTTPREQUEST.HTTPREQUEST_TYPE%TYPE, > > ENTITYNUM IN TWIMB_HTTPREQUEST.HTTPREQUEST_ENTITYNUM%TYPE, > > STARTDATE IN TWIMB_HTTPREQUEST.HTTPREQUEST_STARTDATE%TYPE, > > ENDDATE IN TWIMB_HTTPREQUEST.HTTPREQUEST_ENDDATE%TYPE, > > RESULT IN TWIMB_HTTPREQUEST.HTTPREQUEST_RESULT%TYPE > > ) RETURN NUMBER > > > > I have defined the following mapping xml file: > > > > <parameterMap id="HTTPRequestParamMap" class="HTTPRequest"> > > <parameter property="Browser" column="BROWSER" > dbType="VARCHAR"/> > > <parameter property="Ip" column="IP" dbType="VARCHAR"/> > > <parameter property="RType" column="RTYPE" dbType="VARCHAR"/> > > <parameter property="EntityNum" column="ENTITYNUM" > dbType="VARCHAR"/> > > <parameter property="StartDate" column="STARTDATE" > dbType="DATE"/> > > <parameter property="EndDate" column="ENDDATE" dbType="DATE"/> > > <parameter property="Result" column="RESULT" dbType="VARCHAR"/> > > > </parameterMap> > > > > And statement: > > > > <procedure id="setHTTPRequest" parameterMap="HTTPRequestParamMap" > resultClass="System.Int32"> > > DT_WIMB_INSERTHTTPREQUEST > > </procedure> > > > > And in my Dao object I am doing this: > > > > << Object obj = ExecuteInsert("setHTTPRequest", httpRequest); > log.Debug(" > result = " + obj ); >> > > > > But it does not seem to work correctly. I get the following exception > message: > > > > << 2005-01-24 10:08:07,918 [2328] DEBUG > IBatisNet.DataMapper.Configuration.Statemen > > ts.PreparedStatementFactory [] <> - SQL for statement > 'setHTTPRequest' > :DT_WIMB_INSERTHTTPREQUEST > > > > Exception non girie : IBatisNet.Common.Exceptions.IBatisNetException: > Error > executing query 'setHTTPRequest' for insert. Cause: Le format de la > channe > d'entrie est incorrect. ---> System.FormatException: Le format de la > channe > d'entrie est > > incorrect. > > at System.Number.ParseDecimal(String s, NumberStyles style, > NumberFormatInfoinfo) > > at System.Decimal.Parse(String s, NumberStyles style, > IFormatProvider > provider) > > at System.Convert.ToDecimal(String value, IFormatProvider > provider) > > at System.String.System.IConvertible.ToDecimal(IFormatProvider > provider) > > at System.Convert.ChangeType(Object value, Type conversionType, > IFormatProvider provider) >> > > > > Do anyone one of you know what I am doing wrong? > > > > Thanks a lot for your help, > > > > Regards > > > > Jean-Guillaume LALANNE > > > > > >