WHENEVER SQLWARNING? in Pro*C
Date: 1997/11/18
Message-ID: <34721C9F.2D26357A_at_tortuga.its.cl>#1/1
Hi,
[Quoted] I have a problem with the WHENEVER SQLWARNING statement, I wrote the
following code
EXEC SQL WHENEVER SQLERROR DO sqlerror();
EXEC SQL WHENEVER SQLWARNING DO sqlerror();
....
EXEC SQL select column from table;
in which I mispell the column name and unfortunately the proc doesn't detect the error that the column name is wrong. When I compile, the proc doesn´t detect the column doesn't exist in the table, and in execution the error is not detected also. I looked at the generated .c and it looks like this:
sqlstm.stmt = "select column from table";
....
sqlstm.sqparm = sqlstm.sqharm;
sqlstm.sqparc = sqlstm.sqharc;
sqlcxt((void **)0, &sqlctx, &sqlstm, &sqlfpn);
if (sqlca.sqlcode < 0) sqlerror(); <--- DOES NOT REALIZE OF THE ERROR if (sqlca.sqlwarn[0] == 'W') sqlerror(); <--- DOES NOT REALIZEOF THE ERROR Does any Oracle Guru out there have any idea of what the problem is? How can I detect this kind of errors?
SQLCA was declared, so it should be OK.
thanxs a lot, please reply to:
jsanmart_at_dcc.uchile.cl or jsanmart_at_its.cl
Jorge A. San Martín Received on Tue Nov 18 1997 - 00:00:00 CET