Re: PRO*C question

From: Jodi Showers <jshowers_at_cmi.on.ca>
Date: Mon, 8 Aug 1994 13:41:35 GMT
Message-ID: <jshowers-0808940943030001_at_mac25.cmi.on.ca>


In article <31o9il$t3j_at_news.nofc.forestry.ca>, rsuddaby_at_nofc.forestry.ca wrote:

> In article bi3_at_apakabar.cc.columbia.edu, sb63_at_namaste.cc.columbia.edu
 (Semyon Basin) writes:
> >
> >Hi, Everyone!
>
> [snip]
>
> >ld:
> >Undefined:
> >sqlcex
> >
> >If any kind soul have an idea - please help me.
> >George.
>
>
> You should have the following line somewhere in your source code:
>
> EXEC SQL INCLUDE sqlca;
>
> sqlca is a structure used by ORACLE to hold runtime info about any
> SQL statement being executed by your process. This info includes
> error codes and other processing information. (However... it does
> not have a variable 'sqlcex', or at least this one is not mentioned
> in the manual). Try it out and see if this works.

sqlex (if I'm not in left field) is the function that 'executes' an EXEC SQL '.....' statement.
Although you will need to include the sqlca, this will NOT solve your problem.

If you look at the foo.c after the precompile phase, you will find the each EXEC SQL statement has
been replaced with a struct initialization plus a call to sqlcex.

Example
/* SQL stmt #7
  EXEC SQL COMMIT WORK RELEASE;
*/

  sqlstm.iters = (unsigned short)1;
  sqlstm.offset = (unsigned short)25;
  sqlstm.cud = sqlcud0;
  sqlstm.sqlest = (unsigned char *)&sqlca;
  sqlstm.sqlety = (unsigned short)0;

  sqlcex(&sqlctx, &sqlstm, &sqlfpn);

And ld: is complaining that the function sqlcex is not found; ie. a library reference is missing in
the makefile. Take a look at $ORACLE_HOME/proc/demo/proc.mk and compare it to your make.

if I can help let me know.

Jodi. Received on Mon Aug 08 1994 - 15:41:35 CEST

Original text of this message