I have seen this numerous times in my organization that since they installed a 64 Bit OS (Windows 7/Windows 2008 R2) they think they must install the 64 Bit Oracle Client.
The OS does not control this, the application does.
- If your application is 32 bit it must use the 32 bit client.
- If your application is 64 bit it must use the 64 bit client.
Delphi XE is a 32 bit application. It can only produce 32 Bit applications.
Update after you clarified your question.
- You can have multiple Oracle Clients installed on a machine
- Clients can be different versions or Bitness
- Each Client must be installed into a different Oracle Home
The client application then needs to be smart enough to load the correct libraries. Typically the last client installed ends up on the system path. This typically is
also the default home.
Applications load the OCI library (OCI.DLL) They typically do this with loadlibrary('oci.dll')
which is going to find the version of the OCI.DLL on the system path.
I suspect that is what is happening that is causing your error.
loadlibrary
can be called with full path name to specify which client to use. LoadLibrary('C:\app\oracle\product\11.2.0\client_1\bin\oci.dll')
By default Delphi uses the oracle home on the system search path.
Although I have never tried it you should be able specify the full version
of the OCI.DLL in the dbxdrivers.ini file in Delphi to specify that actual oracle
home you want to use.