Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> New to Pro*C -- Help Please -- Unexpected results
Hello,
I need help about --
My program had been compiled successfully but the result is different from expected.
In the main module i'd connected to Oracle successfully (First Module that
has a Pro*C).
Then I'd try to execute the next module ( with Pro*C Source code) -
unexpected result occurs.
My source codes is like this:
...
/* Copy all contents of CDR_REJECT for recycle */
EXEC SQL WHENEVER SQLERROR DO sql_error("Oracle error:");
EXEC SQL INSERT INTO ISRS.CDR_FOR_RECYCLE
SELECT * FROM ISRS.CDR_REJECT
WHERE Recycle_Flag=1;
nRowsRecycle = sqlca.sqlerrd[2]; /* Im expecting here the no. of rows inserted */
...
....
if(nRowsRecycle!=0L) {
/* process the table here */
...
}
The variable 'sqlca' here is a global variable declared & initialized
somehere.
The Table 'ISRS.CDR_FOR_RECYCLE' initialyhas no content -- so I'm expecting
the variable 'nRowsRecycle' to be equal to zero but it is not. What happens?
I'd tried to print the value of 'sqlca.sqlerrd[2]' in ladebug but it can't,
it gives an error
similar to "can't parse C statement" (i.e 'print (sqlca.sqlerrd[2])' ). Why?
Received on Sun Jan 24 1999 - 23:22:18 CST