Re: [cx-oracle-users] Re: Choosing client libraries
Brought to you by:
atuining
From: Anthony T. <ant...@gm...> - 2006-01-24 20:31:11
|
On 1/24/06, Amaury Forgeotdarc <Ama...@gl...> wrote: > Anthony wrote: > > To understand what I mean, try loading a cx_Oracle module compiled > > against Oracle 9i with an Oracle 8i client. You will get a > > messagebox indicating that the symbol OCISessionGet could > > not be located in oci.dll. If you have a suggestion about how > > to get around that problem __without__ involving a huge > > rewrite of cx_Oracle to call everything dynamically I'm all ears. > > This is what I did some years ago with the old OCI7 function. > At the time, it was the only way to have a program run with > both Oracle7 and Oracle 8i, even if you use only functions > that belong to both libraries. > > My solution is: > - cx_Oracle does not link with any Oracle library. > - instead, we provide an implementation for each OCI* function, > which simply loads dynamically the Oracle client, bind the > function, and call it. > (I just counted 54 different OCI functions in cx_Oracle!) > > Below is a sample, for the old 'olog' function. > > This change would not touch any existing cx_Oracle file, > Only one more file is compiled and linked with cx_Oracle. > > I think the same trick would also work on some other platforms. > At the end, we could have a "dynamic" version of cx_Oracle! Ok. It sounds like a bunch of grunt work but nothing particularly difficult. There is the necessity of "copying" the Oracle header files and there is the question of performance as well. Any thoughts on those? Anthony |