Re: Pro *C question

From: Dave Mausner <dlm_at_dlogics.dlogics.com>
Date: Wed, 02 Jun 1993 10:07:40
Message-ID: <930602100740_at_dlpc030.dlogics.com>


In article <19813_at_pitt.UUCP> jdp_at_pittslug.sug.org (Jeffrey Pickett) writes:

>
> I am writing a C program with embedded SQL that has several subroutines.
> What I need to know is, do host variables have to be global? In every
> example I have seen they are.
>
> Jeff Confused
>

No, they do not. Pro*C creates static declarations at the first invokation of an EXEC SQL block. Put an empty EXEC SQL BEGIN DECLARE SECTION at the beginning of your module, prior to the main(). Then you may place additional EXEC SQL BEGIN DECLARE SECTIONs anywhere you wish them to have local scope.

--
Dave Mausner / Sr Consultant / Datalogics division of Frame Technology Inc
441 W Huron / Chicago IL 60610 / +1-312-266-4450 / "Just show me the code" 
Received on Wed Jun 02 1993 - 10:07:40 CEST

Original text of this message