On 30 Oct, 05:01, srinivas.veera...@gmail.com wrote:
> Hi All,
>
[quoted text clipped - 9 lines]
>
> Srinivas.
It looks like your Number in DB is stored as binary representation ->
your rounding error, try Decimal(18, 16), if it does NOT help, you
might have to store your number as Integer and scale it down.
Lew - 30 Oct 2007 14:23 GMT
srinivas.veera...@gmail.com wrote:
>> I am sending BigDecimal Value(Ex : 2.6000000000000000) to the
>> Databe. I am using the Sybase as Data Base. In the Data Base , the
[quoted text clipped - 3 lines]
>> What the max size allowed after the decimal point. As per the IEEE
>> standards , For Double precision it is 23 bits.
There is no (theoretical) maximum for java.math.BigDecimal
> It looks like your Number in DB is stored as binary representation ->
> your rounding error, try Decimal(18, 16), if it does NOT help, you
> might have to store your number as Integer and scale it down.

Signature
Lew
> I am sending BigDecimal Value(Ex : 2.6000000000000000) to the
>Databe. I am using the Sybase as Data Base.
You will have to read the Sybase docs to figure out if they have
something corresponding to big decimal, or perhaps a character
numeric, then declare your database that type.
I find it odd that after all these years the datatypes, their names
and behaviour are not defined in iron for SQL.
Then see if JDBC has something that won't wreck it in transmission. In
a pinch, use char or a byte blob.

Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com