Null integers in database + Java problem

From: <coakleyj_at_hotmail.com>
Date: Tue, 22 Feb 2000 19:54:23 GMT
Message-ID: <88uphc$ej3$1_at_nnrp1.deja.com>



Hi Everyone.

We're using JDBC to query and populate a database. One of the fields in the Oracle database table is defined as a number(3) and can be null. We are reading this value into a Java variable of type int, but unfortunatley, when the data is null, the Java variable is being initialised to 0 (zero).

Is there any solution to this problem? The data in my database column can be any value in the int range (including zero). I obviously have a similar problem when inserting/updating records.

Thanks for the help

Coakleyj

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Feb 22 2000 - 20:54:23 CET

Original text of this message