Help !!!
Posted in 1997
Topics: Installation, Setup & Upgrades
PLEASE RESPOND TO martyn@kcbbs.gen.nz DO NOT RESPOND TO THE SENDER OF THIS MESSAGE Who has experience composing binaries that talk to both Oracle and Informix? I don't think platform information is vital to my problem here, but please ask for it if you think it necessary. I am hoping a generic answer will be forthcoming. . . I am developing in C on an SGI box. I have made a binary which talks to both Oracle 7 and Informix 5 by precompiling some .ec files with the Informix C precompiler and some .pc files with the Oracle C precompiler, and then compiling the resultant C source along with some ordinary C code, and then linking all together with the requisite runtime libraries (Oracle and Informix) This program currently runs correctly on a simple test which involves several statements being processed on both servers (with uncommitted transactions existing on both servers at the same points in time). The Oracle server is running locally, the Informix server is being accessed on another computer using sqlexec. However I am concerned: Both Oracle and Informix runtime libraries (and my code too) reference the global structure called sqlca. This structure is defined differently (and more importantly, with different size) by the INCLUDE header definitions for the respective runtimes. When linked, a warning is given that sqlca is defined more than once, but I am guessing that the linker chooses to use the first definition it finds (the Oracle one at the moment). I know little about how sqlca is used by either runtime (Eg are there important fields to be preserved between sql calls?) but it seems to me that it is possible all will be well, provided the structure definition *allocated for* is the larger one so that neither runtime will reference the forbidden territory outside, and clobber some other data. Important questions: - Is this program doomed to fail at some future time or can it be made bullet proof? (and I include in the definition of bullet proof that the program will run properly after upgrade of either server run-time) - Are there any other nasty implications in this dual- server binary that have yet to hit me?! Please email me. Thanks in advance, Martyn Barry.