Re: Pro*C - EXEC SQL BEGIN DECLARE SECTION;

From: Enomoto <fenomoto_at_mail.arc.nasa.gov>
Date: Wed, 08 Dec 1999 20:09:36 -0800
Message-ID: <384F2B73.FE2964B7_at_mail.arc.nasa.gov>


[Quoted] In our recent experience, it seems to be mandatory to use the EXEC SQL BEGIN DECLARE SECTION
when compiling C++ code, but is optional when compiling C code, at least for the precompilers that ship with Oracle 8.0.5.1. The host variables aren't recognized in later EXEC SQL statements when precompiling in C++ if you don't
declare them in the SQL BEGIN DECLARE SECTION first.

Kenneth C Stahl wrote:

> Clint Eastwood wrote:
> >
> > HiYa
> >
> > what is the purpose of this in the code? I have compiled with and
> > without it, and it seems to make no difference, in fact looking at the
> > processed .c file it's just commented out.
> >
> > I know that in PL/SQL the format
> > DECLARE
> > ..
> > BEGIN
> > ..
> > END;
> >
> > is mandatory syntax, is EXEC SQL BEGIN DECLARE SECTION; in Pro*C just to
> > make folk feel at home?
> >
> > thanks
> >
> > See Ya
> > (when the bandwidth gets better ;-)
> > Chris Eastwood Please remove undies for reply
> > Photographer, Stunt Programmer
> > Motorcyclist and dingbat
>
> starting with PRO-C 2.0 (I think) the EXEC SQL BEGIN DECLARE SECTION became
> optional in many cases. If you can compile without it, then do so. In older
> versions it was mandatory.
Received on Thu Dec 09 1999 - 05:09:36 CET

Original text of this message