hmm...I was hoping it was just a missed sqlcode. I dont think you are
going to be able to determine much by the info I have. This is just
what is being logged from sqlca.sqlcode after statement:
EXEC SQL
DECLARE c1 CURSOR FOR stmt;
sprintf(logstr, "Error from DECLARE, SQLCODE %d ",
(short)sqlca.sqlcode);
the logs says:
2006.02-01.10:14:14.681992 c0v0 XDB Error from DECLARE, SQLCODE 72
Just after logging it does a: if (sqlca.sqlcode == 0){
it does not go in here so I know it is returning a non-zero sqlcode.
The logging has always been correct in the past so I have reason to
believe it is correct.
There is nothing between the EXEC, sprintf and the 'if'. logstr is
also plenty long enough.
I will have to try using the debugger on it to see if the memory space
is being overwritten by something else running or if db2 is, in fact,
sending back a 72. This is currently being run on a test machine where
there is very little running.