Re: [Q] Compatibility of Oracle Pro*C and C++

From: Marek Pytlik <pytlik_at_eris.cs.umb.edu>
Date: 9 Oct 1993 17:32:22 GMT
Message-ID: <296sj6$4e4_at_cs.umb.edu>


In article <DAVIDM.93Oct7105653_at_malibu.consilium.com>, David S. Masterson <davidm_at_consilium.com> wrote:
><>>>> On 1 Oct 93 19:34:51 GMT, pytlik_at_eris.cs.umb.edu (Marek Pytlik) said:
>
>< In article <MLOENNRO.93Oct1010026_at_wrpyr4.us.oracle.com> mloennro_at_us.oracle.com (Magnus Lonnroth) writes:
>
><>At the moment, there is no way of including embedded SQL in C++ modules.
>
>< How about this:
>
>< cBroadcast::open( int id)
>< {
>< // our macro
>< EXEC SQL DECLARE CB1 CURSOR FOR
>< ...
>< WHERE ID=...
>< ;
>< EXEC SQL OPEN CB1;
>< return 0;
>< fail:
>< return 1;
>< }
>
>< Similary you can do cBroadcast::fetch, and others.
>
>
><>To use Pro*C v1 (and v2 soon to be released) you must write extern C
>
>< All you have to do (oracle unsupported), is to have something like:
>
>< extern "C" {
>< extern void sqlbcc( int*, int* );
>< ...
>< }
>
>
>Can you elaborate on what you're doing here? It seems fairly Oracle specific
>and, therefore, likely to fail at the next Oracle patch or version change.
>What is sqlbcc()?

  1. The purpose of this is to tell your C++ code that sqlbcc, which is put in by precompiler, exists as external C function. We have it in one header file , so when Oracle adds new prototypes, all you have to do is go to that file and add it too. This will happen to you when doing move from proc (pcc?) 1.3 or lower to 1.4.11.
  2. Yes, you are right, it is not Oracle supported.
  3. Look (HP-UX) $ORACLE_HOME/proc/lib/sqlcpr.h

Mark Received on Sat Oct 09 1993 - 18:32:22 CET

Original text of this message