Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

preprocessing & compilling modules

0 views
Skip to first unread message

Pietro

unread,
Oct 18, 2001, 12:42:31 PM10/18/01
to interbase ML
Hi all,

I've problem here (Houston :)

Linux RedHat 7.1, InterbaseSS-LI-6.0., gpre LI-V6.0.1.0
How I can preprocessing C program made from
many modules?

Main module
EXEC SQL
SET DATABASE xx = <gdb_file_pathname>
USER <user>
PASSWORD <password>;

module a
nothing

module b
EXEC SQL
CONNECT xx;
EXEC SQL
DECLARE <cursor_name> CURSOR FOR
SELECT * FROM <table_name>;
EXEC SQL
SET TRANSACTION;
EXEC SQL
OPEN <cursor_name>;
EXEC SQL
FETCH <cursor_name>
INTO :<var1>,:<var2>, . . . ;

module c
EXEC SQL
CONNECT xx;
EXEC SQL
DECLARE <another_cursor_name> CURSOR FOR
SELECT * FROM <another_table_name>;
and so on . . .

In last three days I've tried all possible (from my point
of view), manual Embedded SQL (pg. 291, ..) is too
cryptic for me (or I'm too stupid to understand it ??)
At the end I joined all in unique source file, yea, it
works, but I don't like it. (1,800 lines of code in unique
file and it's not finished yet)

Any help (any info, link to another sources of info)
will be appreciated.
Thanks in advance.

Pietro
P.S. I'm sorry for my English :(
I know, it's not so good.

Ann W. Harrison

unread,
Oct 18, 2001, 1:24:49 PM10/18/01
to interbase ML
At 06:42 PM 10/18/2001 +0200, Pietro wrote:

>At the end I joined all in unique source file, yea, it
>works, but I don't like it. (1,800 lines of code in unique
>file and it's not finished yet)
>
>Any help (any info, link to another sources of info)

Each separate file needs a SET DATABASE statement. That
statement takes the qualifiers "GLOBAL", "EXTERN", and
"STATIC". If your main module uses the "GLOBAL" option,
which is the default, use "EXTERN" in the other modules.


Regards,

Ann
www.ibphoenix.com
We have answers.


Pietro

unread,
Oct 18, 2001, 3:42:29 PM10/18/01
to inte...@mers.com
Il 19:24, giovedě 18 ottobre 2001, hai scritto:
> Each separate file needs a SET DATABASE statement. That
> statement takes the qualifiers "GLOBAL", "EXTERN", and
> "STATIC". If your main module uses the "GLOBAL"
> option, which is the default, use "EXTERN" in the other
> modules.
>
>
> Regards,
>
> Ann

Yahoo!!!! It works !!
You're great Ann, many, many thanks!

Pietro

P.S.
'When all it goes wrong, it's time to read manual'
Finally I find it (Embedded SQL, pg. 40)
Once more thanks.

0 new messages