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: JDBC error feedback like in SQL*Plus

Re: JDBC error feedback like in SQL*Plus

From: Mark Bole <makbo_at_pacbell.net>
Date: Sun, 12 Sep 2004 01:51:01 GMT
Message-ID: <9YN0d.18501$163.2013@newssvr27.news.prodigy.com>


Thomas Kellerer wrote:

> JDBC question wrote on 10.09.2004 20:26:
> 

>> Thanks for the reply! I wonder if there was pure JDBC way...
>> or even using Oracle-specific jdbc classes for that?
>>
>> To give a better SQL example: by running this query:
>> SQL> select stuff from dual;
>> select stuff from dual
>> *
>> ERROR at line 1:
>> ORA-00904: "STUFF": invalid identifier
>>
>> That's the kind of output I am trying to get back. After
>> all, it's the same Oracle server code that's parsing the query,
>> so why it's returning less information through JDBC compared to OCI
>> (e.g. oerhms function)?
> 
> 
> This depends on the JDBC driver version. I think starting with the 9.2 
> drivers Oracle has added this information to the error message supplied 
> in the Exception
> 
> Thomas

Is your JDBC driver thick or thin? Thick uses OCI, thin doesn't.

As a side note, I spent a lot of time once trying to find *any* Oracle documentation (9i) on the "asterisk at the first character of the input related to the error" feature. Couldn't find any - maybe someone else has? I have noticed from time to time (sorry, no specific examples handy) that the asterisk is not always at the place where the error actually occurs.

--Mark Bole Received on Sat Sep 11 2004 - 20:51:01 CDT

Original text of this message

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