Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> JDBC type mismatch?

JDBC type mismatch?

From: Stephen James <joe_at_hotmail.com>
Date: Wed, 18 Jul 2001 20:21:48 GMT
Message-ID: <wdm57.127$ll3.24627233@news2.randori.com>

I'm running oracle 8.1.6 on a sun ultra 5 and connecting from a Java program running on a win2k sp2 machine
with jdk 1.3.0_02 and the oracle thin jdbc drivers (i.e. classes12.zip).

Here's the problem:

When I look at the database meta data for a particular table it reports that a
column named "JID" has a type of java.sql.Types.DECIMAL.

Later on when I query the table using a "select *" the result set meta data says the same column is of type java.sql.Types.NUMERIC.

My consistency checking code then throws the following exception:

java.sql.SQLException: column type mismatch at JID expect Types.DECIMAL got Types.NUMERIC

Any ideas on why the database metadata and the result set metadata have different
notions of the type of this column? The original sql used to create the table looked
like this:

CREATE TABLE ASTEROID (

       JID                  NUMBER NOT NULL,
       ...

Thanks. Received on Wed Jul 18 2001 - 15:21:48 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US