Subject Problem reading large numbers
Author Uwe Jäger
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