Re: Communication between two Informix databases
Posted in 1998
Sudhi.Murthy@AUTOZONE.COM wrote: > > Hi, > > For our present software application (we are still in the design phase) > we have come across a situation where in which an ASCII (i.e. non-ANSI) > compliant Informix database (sitting on Windows NT) needs to talk > to an ANSI compliant Informix database (sitting on UNIX). I would like > to know how to achieve this, as a part of: > > 1. a Stored Procedure > 2. a C/C++ application > > I will be more than happy if anybody can tell me the detailed > procedure on how to do it OR the issues involved if we are > not able to do that. In a stored procedure it is just not possible. You cannot reference objects in a mode ANSI database if you are connected to a non-ANSI database and vice versa. In ESQL/C you CAN have separate connections to each of the databases and switch connections at will. You can fetch data from either and compare it, in program space or as replaceable parameters to data from the other database after switching connections. See dbcopy.ec or myschema.ec as examples of using multiple connections to fetch data from incompatible databases. Both are part of my submission to the IIUG Software Repository named utils2_ak. As a bonus my testing indicates that even for compatible databases on different servers there is LESS overhead to switching between two application connections than referring to remote databases through the local or default server and performance improves. Art S. Kagel