ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Butler" <dhsc...@cstone.dhs.state.il.us>
Subject Re: QueryForObject returns wrong data
Date Wed, 27 Jul 2005 17:43:52 GMT
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...

http://java.sun.com/j2se/1.4.2/docs/api/java/sql/CallableStatement.html#registerOutParameter(java.lang.String,
int)

I'm guessing this is the problem.  The solution is somewhat more
evasive...

Jeff Butler


Mime
View raw message