db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Dudziak <tom...@gmail.com>
Subject Re: setObject(idx, bigDecimal, Types.NUMERIC); doesn't work ?
Date Thu, 05 Jan 2006 13:21:11 GMT
On 1/4/06, Bernt M. Johnsen <Bernt.Johnsen@sun.com> wrote:

> I was too fast in my conclusions. It is not a bug.
> setObject(idx, bigDecimal, Types.NUMERIC) is defined to be identical
> with setObject(idx, bigDecimal, Types.NUMERIC, 0) and that's exactly
> what Derby does.
> If you need decimals, you have to specify scale. E.g.:
> setObject(idx, new BigDecimal("0.9999"), Type.NUMERIC, 4);

Indeed, you're right (though I think this is a design error in JDBC
itself). I've changed my source accordingly (using setBigDecimal


View raw message