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 -> Using C variables as host variables in Pro*C program

Using C variables as host variables in Pro*C program

From: Enrique <aviles94_at_rcn.com>
Date: 20 Mar 2003 13:51:41 -0800
Message-ID: <ca9fa791.0303201351.664490d3@posting.google.com>


I had the "honor" of inheriting some old Pro*C programs that were written and compiled under Oracle 7.3.4. One of the programs has a C struct declared in a header file. The C struct is used directly on SQL statements like this:

EXEC SQL
  SELECT column1
  INTO struct_name->element1
  FROM table_name
  WHERE some_condition;

This compiles and works well under Oracle 7.3.4. Since this is old code and everything else we have is in Oracle 8.1.7 I tried to compile the old code with Oracle 8.1.7 libraries. I got numerous errors about undefined host variables on SQL statements like the one above. Can I use C variables as host variables in Oracle 8.1.7??? I want to think that it is possible since it works in the older version. I *have* to compile the old code with Oracle 8.1.7 because it calls functions that are located on external libraries that were compiled with Oracle 8.1.7. When I run the old code compiled with 7.3.4 it fails with the following error:

02127, 00000, "Precompiler/SQLLIB version mismatch"
// *Cause: The program was linked to an older version of SQLLIB, which
is
// incompatible with this release of the Oracle Precompilers.
// *Action: Relink the program with a newer version of SQLLIB

The code found in the external libraries was compiled with Oracle 8.1.7 so the program fails with this error as soon as it tries to call the library function.

Is there an easy way to make the old code (that uses C variables as host variables) compile with 8.1.7?? Any precompiler option that I need to set?

Any help will be appreciated.

E. Received on Thu Mar 20 2003 - 15:51:41 CST

Original text of this message

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