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

Home -> Community -> Usenet -> c.d.o.misc -> Re: JDBC error feedback like in SQL*Plus

Re: JDBC error feedback like in SQL*Plus

From: JDBC question <medvedevclasses_at_yahoo.com>
Date: 15 Sep 2004 10:40:57 -0700
Message-ID: <981289bf.0409150940.2bd0d037@posting.google.com>


As you pointed out:
> Ex: Select * from invalidtable
> on sqlplus gives you
> *
> ERROR at line 1:
> ORA-00942: table or view does not exist
>
> Using a java program same statement throws you exception
>
> ORA-00942: table or view does not exist

The missing information I am trying to get from JDBC is
> Select * from invalidtable
> ^
> ERROR at line 1:
> ORA-00942: table or view does not exist

In comparison the Oracle OCI interface
has a function that returns that missing info, and JDBC doesn't. I looked at all the chained exceptions etc.

The reason I need it is our program generates and runs queries that are many hundreds of lines long and are generated on the fly. If a query has an error the only way to figure out where it is is to copy and paste a query in SQL*Plus -- that gives you the line number and column number of where the Oracle parser encountered the error. I was looking for a way to do it programmatically instead of manually...

I posted a question on Oracle Metalink boards but haven't heard back.. Maybe the way to get their attention is to file a bug report. Received on Wed Sep 15 2004 - 12:40:57 CDT

Original text of this message

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