Garayed.com  

Go Back   Garayed.com > Oracle
FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-04-2008, 07:29 AM
vihangtole@gmail.com
 
Posts: n/a
Default Urgent (Pro*C++)

I am unable to compile my Pro*C++ program when i declare any host
variables/structures in header files. It seems that Pro*C++ only
accepts declaration placed inside the block
EXEC SQL BEGIN DECLARE SECTION;
EXEC SQL END DECLARE SECTION;

But EXEC SQL statement are not allowed inside header files. Therefore
i am forced to include host structure / variable definitions in the
main program.

But i want to access these structure across different programs. I am
forced to include these definitions in each program as i cant include
them inside header file.

Pro*C allows you to declare host structure / variables anywhere
(header files / program).
But i think Pro*C++ has above mentioned restriction.

Is there any way out???
Please help me.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-04-2008, 10:21 AM
Laurenz Albe
 
Posts: n/a
Default Re: Urgent (Pro*C++)

vihangtole@gmail.com <vihangtole@gmail.com> wrote:
> I am unable to compile my Pro*C++ program when i declare any host
> variables/structures in header files. It seems that Pro*C++ only
> accepts declaration placed inside the block
> EXEC SQL BEGIN DECLARE SECTION;
> EXEC SQL END DECLARE SECTION;
>
> But EXEC SQL statement are not allowed inside header files. Therefore
> i am forced to include host structure / variable definitions in the
> main program.
>
> But i want to access these structure across different programs. I am
> forced to include these definitions in each program as i cant include
> them inside header file.
>
> Pro*C allows you to declare host structure / variables anywhere
> (header files / program).
> But i think Pro*C++ has above mentioned restriction.
>
> Is there any way out???


I haven't tried it, but maybe the EXEC SQL INCLUDE can help you.

According to the documentation, it will include the header file into
the C source during the precompile step, so you can have any embedded
SQL statements in a file that is included that way.

Yours,
Laurenz Albe
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 06:05 PM.




LinkBacks Enabled by vBSEO 3.0.0 © 2007, Crawlability, Inc.