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: Pro*C/C++ Expert needed -- sqlca.sqlerrd[4]

Re: Pro*C/C++ Expert needed -- sqlca.sqlerrd[4]

From: Michael Mauch <michael.mauch_at_gmx.de>
Date: Sun, 18 Nov 2001 00:15:15 +0000
Message-ID: <jiu6t9.hp.ln@elmicha.333200002251-0001.dialin.t-online.de>


Xuehua Lu <xuehua.lu_at_sabre.com> wrote:

> We need your help! Here is the problem. We wrote a library function
> to execute SQL statement. Usually, it works very well. But if there
> is a problem with the query statement (which can be very complicated),
> my life turns miserable. I have to spend a whole day or two to dig
> out those mis-typing or datatype mis-matching.

Ah, so I'm at least not the only one.  

> I know Oracle has something there to help. All I find out is that
> we are supposed to be able to use sqlca.sqlerrd[4] to identify the
> error location of SQL statement string (Let's take EXEC SQL PREPARE
> as example). But the reality is, sqlca.sqlerrd[4] always returns 0.

Even the ansidyn2 example doesn't give the column number:

SQL> select empnumber from emp;

ORA-00904: invalid column name                                        

Parse error at character offset 0 in SQL statement.

Oracle 8.1.6 on Linux and Tru64 and 8.1.7 on Solaris.

Regards...

                Michael Received on Sat Nov 17 2001 - 18:15:15 CST

Original text of this message

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