Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> New to Pro*C -- Help Please -- Unexpected results

New to Pro*C -- Help Please -- Unexpected results

From: Jun <jmarcos_at_skyinet.net>
Date: Mon, 25 Jan 1999 13:22:18 +0800
Message-ID: <78gv3r$msb$1@news.skyinet.net>


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

Original text of this message

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