You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Stuart Heriot <sh...@infocomp.com> on 2004/03/25 23:34:18 UTC

Loss of precsion with PersistenceBroker.store() and BigDecimal on Sybase.

Hi, 

We have come across a problem storing BigDecimals with values being
truncated and all decimal places being set to zero. Our system has a number
of value types stored with 2, 4 or 6 decimal point precision. We are using
BigDecimals rather than floats or doubles to maintain accuracy in financial
calculations within our application. Repository mapping has JDBC-TYPE set to
DECIMAL and precision set as required. Old values in the database are
retrieved Ok with the correct precision but new values we try and store are
all truncated. 

I came across a posting some months ago about a similar problem with DB2 and
using prepared statements. Is there a fix for this?

Currently using OJB rc5 and a Sybase 12.5 database.

Thanks in advance...

Stuart Heriot