db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernt M. Johnsen" <Bernt.John...@Sun.COM>
Subject Re: setObject(idx, bigDecimal, Types.NUMERIC); doesn't work ?
Date Wed, 04 Jan 2006 21:23:56 GMT
>>>>>>>>>>>> Bernt M. Johnsen wrote (2006-01-04 13:00:17):
> >>>>>>>>>>>> Thomas Dudziak wrote (2006-01-03 17:18:02):
> > 
> > Shall I file a JIRA issue then ?
> 
> I'll do it.

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);
-- 
Bernt Marius Johnsen, Database Technology Group, 
Staff Engineer, Technical Lead Derby/Java DB
Sun Microsystems, Trondheim, Norway

Mime
View raw message