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 -> Getting actual error string with ODBC to Oracle

Getting actual error string with ODBC to Oracle

From: Kevin <Log.In_at_Comcast.Net>
Date: Mon, 16 Sep 2002 22:40:44 -0600
Message-ID: <am6bv8$33vpu$1@ID-142050.news.dfncis.de>


If I use SQLPlus, I can type in some 'bad' SQL and it gives me this:

  1 select

  2                 joe

  3 from
  4* a_lot_at_operation
  5 /
               joe
               *

ERROR at line 2:
ORA-00904: invalid column name

I'm using Oracle ODBC driver to execute my SQL, and all I get is the last error message (that there is an invalid column name, but no indication of where in the SQL the error actually exists). Obviously SQLPlus gets some information back about what line and text 'column' the error is at.

Do anyone know how to get that same information (line & text column) via ODBC? [I've tried the SQLError, SQLGetDiagRec and SQLGetDiagField functions, but still only get the basic error message.]

Thanks in advance for any help. If you reply to this, please copy me via email as well.

/kjs

ps- or conversely, if you know that OCI supports this functionality, I'd be interested also. Received on Mon Sep 16 2002 - 23:40:44 CDT

Original text of this message

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