BEGINNING
Posted in 1999
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
I begin in Informix on UNIX V/286 et ESQL V2.10.03B. I write that (as my book): #include <stdio.h> main() { EXEC SQL connect to 'myd'; } but after ESQL depart.ec error C2065 : 'EXEC' undefined C2146 : syntaxe error : mising ';' befor identifier 'SQL' and same thing for other word. What I have no make ? It's not good method to use C et INFORMIX ?? Thank
Bruno SITOT wrote: > I begin in Informix on UNIX V/286 et ESQL V2.10.03B. I write that > (as my book): > > #include <stdio.h> > main() > { > EXEC SQL connect to 'myd'; > } > but after ESQL depart.ec > > error C2065 : 'EXEC' undefined > C2146 : syntaxe error : mising ';' befor identifier 'SQL' > > and same thing for other word. > What I have no make ? It's not good method to use C et INFORMIX ?? ESQL/C 2.10.03B is about 12 or 13 years old. Informix has only supported CONNECT for the last 5 or 6 years. And the EXEC SQL notation was introduced in version 4.00, I think; that is over 10 years ago, but after your software was produced. Hmm; let me think -- what is the problem? :-) -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN #include <disclaimer.h>
In article <7rchfu$c0a$1@news.xmission.com>, Bruno SITOT <sitotbruno@francemel.com> writes: > > I begin in Informix on UNIX V/286 et ESQL V2.10.03B. I write that (as my book): > > #include <stdio.h> > main() > { > EXEC SQL connect to 'myd'; > } > but after ESQL depart.ec > > error C2065 : 'EXEC' undefined > C2146 : syntaxe error : mising ';' befor identifier 'SQL' > > and same thing for other word. > What I have no make ? It's not good method to use C et INFORMIX ?? V2.10.03B is very old. More than 10 years, I thing. However. As far as I remember, you have to type a simple $ instead of 'EXEC SQL'. For the rest you can only try if you don't have the manuals. -- Theofilu Andreas http://members.eunet.at/theofilu ------------------------------------------------- Enjoy the science of Linux! Genieße die Wissenschaft von Linux! -------------------------------------------------
Also the CONNECT statement is an ESQL Version 7.xx+ extension and was not available in ESQL 2.10.03. Andreas is correct the original, Informix specific, ESQL statement and host variable prefix was "$". The ANSI ESQL standard, which specified the "EXEC SQL" statement prefix and ":" host variable prefix, came later around ESQL 4.00 IMS. Art S. Kagel Andreas Theofilu wrote: > > In article <7rchfu$c0a$1@news.xmission.com>, > Bruno SITOT <sitotbruno@francemel.com> writes: > > > > I begin in Informix on UNIX V/286 et ESQL V2.10.03B. I write that (as my book): > > > > #include <stdio.h> > > main() > > { > > EXEC SQL connect to 'myd'; > > } > > but after ESQL depart.ec > > > > error C2065 : 'EXEC' undefined > > C2146 : syntaxe error : mising ';' befor identifier 'SQL' > > > > and same thing for other word. > > What I have no make ? It's not good method to use C et INFORMIX ?? > > V2.10.03B is very old. More than 10 years, I thing. However. As far as > I remember, you have to type a simple $ instead of 'EXEC SQL'. For the > rest you can only try if you don't have the manuals. > -- > Theofilu Andreas > http://members.eunet.at/theofilu > > ------------------------------------------------- > Enjoy the science of Linux! > Genieße die Wissenschaft von Linux! > -------------------------------------------------