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

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

Post by Xuehua L » Sat, 03 Nov 2001 00:42:43



Hi, Experts:

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.

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.

We did consult some other experienced proC/C++ programmer.
Unfortunately, he experienced the exact same frustration as we are
having now.

Anybody can have a hint? I really appreciate it.

Lu
817-264-6842

 
 
 

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

Post by Michael Mau » Mon, 19 Nov 2001 09:15:15



> 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.

Quote:> 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

 
 
 

1. ORACLE 8 - PRO*C/C++ - SQLCA not defined during linking phasis

Hello,

I actually work with oracle 8.1.5 on solaris 2.5 : I developped a
client with PRO*C/C++ and I included sqlca.h file in my source.
During the linking phasis, ld utility says that SQLCA is unknown (I
linked with clntsh dynamic library but I don't know if it is the right
library). If someone could help me :).

Thanx in advance
David Drugeon

Sent via Deja.com http://www.deja.com/
Before you buy.

2. Upgrade Question - In Place Alters

3. Duplicate sqlca symbol error in Pro*C++

4. Performance help

5. sqlca.sqlerrd[2] ?

6. Date calculation problem?

7. Equivalent of 4GL's SQLCA.SQLERRD[3] in stored procedure

8. Foxpro: Used() & File In Use

9. Assigning values to sqlca.sqlerrd

10. sqlca.sqlerrd[2] retrieve the wrong serial (Online 7.31/AIX)

11. sqlca and sqlerrd

12. Serial value after insert does not show in sqlca.sqlerrd[1] (Bug #146052)

13. SQLCA.SQLERRD[2]