Re: Help on ESQL/C reqd urgently
Posted in 1997
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
This is a multi-part message in MIME format. --------------2BA12CBD3A3A Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit krishna@lords.com wrote: > > I need some help on two counts urgently. > 1. I am trying to program a C++ file to interface with a ESQL/C .ec file > to access the data from the Informix database. I am able to get the data > neatly through a ordinary C file. Even in my compilation of the other C > files with the ANSI switch on I get a lot of errors from the Informix > library files saying no prototypes found. > > Has anyone been successful in compiling ESQL/c program file with the C > Compiler ANSI switch on ? > > 2. I have this stubborn piece of code which refuses to compile. > in my .ec file this statement just does not compile. > EXEC SQL CONNECT TO "stores5" > > I have also tried > EXEC SQL CONNECT TO "stores5@online " > EXEC SQL CONNECT TO "stores5@online " AS "kk" > > But I keep getting this error > $ > esql -ansi kk.ec > esqlc: "kk.ec", line 23: Error -33200: Invalid statement on symbol > 'CONNECT'. > esqlc: "kk.ec", line 23: Error -33051: Syntax error on identifier or > symbol '"stores5@online "'. > 2 error(s) found > > Can someone please help me out on these points ? > I am using Informix Server online 5.0 with ESQL/C and INFORMIX SQL ver > 4.10 I didn't think CONNECT was supported until version 6.x or higher. But then I could be wrong. Have you tried using DATABASE? Cheers, -- --------------2BA12CBD3A3A Content-Type: text/plain; charset=us-ascii; name="ATT_SIG.TXT" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ATT_SIG.TXT" Mark. +------------------------------------------------------------------+ |Mark D. Stock - The West Solutions Group http://www.west.co.za | | The Informix FAQ is at http://www.iiug.org | |mailto:marks@west.co.za +-----------------------------------------+ |Tel: +27 11 803 2151 |If it doesn't work, force it! | |Fax: +27 11 803 2189 |If it breaks, it needed replacing anyway!| |Cell: +27 83 250 2325 |Well, that's how I code anyway! | +------------------------+-----------------------------------------+ --------------2BA12CBD3A3A--