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.
>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.
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.