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

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle JDBC metadata screwups

Re: Oracle JDBC metadata screwups

From: Volker Hetzer <volker.hetzer_at_ieee.org>
Date: Wed, 17 Dec 2003 13:15:48 +0100
Message-ID: <brphdl$k4q$1@news.fujitsu-siemens.com>

"Joe Weinstein" <joeNOSPAM_at_bea.com> schrieb im Newsbeitrag news:3FDE5AE7.8070706_at_bea.com...
>
>
> Volker Hetzer wrote:
>
> > "Joe Weinstein" <joeNOSPAM_at_bea.com> schrieb im Newsbeitrag news:3FDDFDD9.4010603_at_bea.com...
> >
> >>
> >>Mike Schuler wrote:
> >>
> >>
> >>>Why are there so many problems with Oracle JDBC drivers - ever since
> >>>they came out? I can't differentiate between SYSTEM TABLES and TABLES,
> >>>the ResultSetMetaData doesn't have values for decimal places or sizes,
> >>>etc...
> >>>I'm using Oracle 9i, with the newest ojdbc14.jar and I can't believe
> >>>we're the only ones with these problems.
> >>
> >>It's not the driver's fault. The driver has to depend on what
> >>the DBMS sends, especially for result set metadata etc. It
> >>would take a (probably not backward-compatible) change to the
> >>DBMS protocol for it to start returning more/better metadata.
> >>As an example, the metadata is insuffient, for most numerical
> >>data, for the driver to adhere to the JDBC spec for what object
> >>to make for getObject(). That's why the driver punts on this
> >>issue, and just returns a BigDecimal for all numeric data.
> >
> > But when using C/ESQL one can get at the column type/precision.
> > One just has to ask the output descriptor.
> >
> > Greetings!
> > Volker
>
> Thanks Volker! That implies the metadata is suffient! Would you
> show me what the output descriptor shows for various numeric
> columns? (float, integer, NUMBER(10,2), NUMBER, etc)
I've only had a look at the documentation which is here: http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a97269/pc_14ady.htm#1007254

Basically, the EXEC SQL GET DESCRIPTOR :hv1 = TYPE, :hv2 = PRECISION, :hv3 = SCALE; should do it if I understand you correctly.

Lots of Greetings!
Volker Received on Wed Dec 17 2003 - 06:15:48 CST

Original text of this message

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