ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shilpa <shilpa.prad...@judiciary.state.nj.us>
Subject Re: QueryForObject returns wrong data
Date Wed, 27 Jul 2005 18:00:47 GMT
Jeff Butler <dhscn06 <at> cstone.dhs.state.il.us> writes:

> Unfortunately, I think this could be an iBATIS issue...
> In the class com.ibatis.sqlmap.engine.execution.SqlExecuter, the method
> "registerOutputParameters" always calls the version of
> CallableStatement.registerOutputParameter that does not accept the scale
> argument.  My guess is that the DB2 driver is setting the scale to zero
> in this case.
> Before we all start screaming at IBM, please note that the JavaDoc for
> this method explicitly states that this method should not be used in the
> case of DECIMAL and NUMERIC types.
> Here's a link to the JavaDoc...
> int)
> I'm guessing this is the problem.  The solution is somewhat more
> evasive...
> Jeff Butler

But I am doing same thing using normal JDBC call also. In that case I am 
getting correct value and also if I call scale() method on my bigDecimal 
Property, its returning me '2', that means, DB2 is returning me 99.44 using 
normal JDBC API, with same value object.

Thanks for your reply,

View raw message