Subject Re: [Firebird-Java] Re: Repost: Problem reading large numbers
Author Uwe Jäger
Well,

done it myself ... please find a patch attached; the problem was that
BigDecimals were created through double values, but those have only
about 15 significant digits, not 18 as needed in my scenario.

Kind regards
Uwe

rrokytskyy wrote:
> Uwe,
>
> I will check this issue and will report the result/fix.
>
> Best regards,
> Roman Rokytskyy
>
> --- In Firebird-Java@y..., Uwe Jäger <jaeger@v...> wrote:
>
>>Hi,
>>
>>we use NUMERIC(18) to store generated id's for the data in our
>
> database.
>
>>When I execute a select with the jdbc driver, the driver returns
>
> the id
>
>>with the last digit set to 0 instead of the real value.
>>
>>You should be able to reproduce this, e.g.
>>
>>CREATE TABLE MenuTree_T (
>> ObjectID NUMERIC(18) NOT NULL,
>> ObjectTS TIMESTAMP NOT NULL,
>> LastUserID VARCHAR(20) NOT NULL,
>> TreeType NUMERIC(2) NOT NULL,
>> OIDUser NUMERIC(18),
>> CONSTRAINT MenuTree_P
>> PRIMARY KEY (ObjectID)
>>);
>>
>>INSERT into menutree_T values (
>> '48638933116718883',
>> '2002-05-10 15:05:25.0',
>> 'system',
>> 0,
>> NULL
>>);
>>
>>SELECT * FROM MENUTREE_T where treetype = 0 and oiduser is null;
>>
>>and retrieve the objectid with resultset.getBigDecimal("OBJECTID",
>
> 0);
>
>>This will result in the objectid being 48638933116718880.
>>
>>I hope you can reproduce this and find the problem.
>>
>>This happens with the (latest?, 18/7/2002) version from cvs.
>>
>>Kind regards
>>Uwe
>
>
>
>
> To unsubscribe from this group, send an email to:
> Firebird-Java-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>