Re: Example of remote DB access via ESQL/C
Posted in 1997
Arun Shastry (ashastry@ultranet.com) wrote: >X-Informix-List-Id: <news.35126> > >Jonathan Leffler wrote: >> >What requirements are there? >> >> You need an ESQL/C Development licence on the machine where you compile the >> program. You need an ESQL/C Runtime licence (or an Informix-Connect >> licence) on the machine where you are going to run the program if it >> doesn't already have one. You need the database system up and running >> on the remote system. You need to be able to connect to it using, for >> example, DB-Access. If you can't connect using the standard Informix >> utilities, it is unlikely that your ESQL/C program will fare any better. > >You can have your ESQL/C application connect to the remote server with >just sqlhosts and an entry in the /etc/services file. You don't need any >of the Informix binaries on the client machine for this configuration to >work, I have to disagree on at least two counts. 1. If you use an ESQL/C application on a machine without any licence, then you are going to get into trouble for breaking your licence agreement with Informix. 2. To the best of my knowledge, you actually must have a complete set of things like message files and GLS locale information in order to be able to do anything because the code checks that the environment is complete. You may be correct if we interpret 'Informix binaries' to mean just executable programs -- provided you are using a 6.00 or later version of ESQL/C. If you are using a 5.0x version or earlier, then you need either the I-Net or the I-Star executables. If you linked your ESQL/C application with shared libraries, then you also need the shared libraries. If you are using 7.2x, then you must have the GLS stuff on your machine -- it won't work otherwise. Prior to 7.2x, GLS was not available, but I think you still need the message files. With I4GL and related products, you definitely need the message files around -- they check to see that they're there before allowing you to do anything else. >other than ESQL/C for compilation if the two hosts are different (OS >or versions). > >The only condition is that your remote server must be able to accept >TCP/IP connections (the standard stuff, must have an entry in sqlhosts >entry on the remote host, a service entry and so on) AND the service name >and sqlhosts file must exactly be the same on the client host. Yours pedantically, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>