Windows 7 x64 and Oracle Client

I installed my Windows 7 x64 this weekend and so far everything is great. Much better than when I was running on Vista.

I thought I had run into my first problem with 7 when was setting up my Oracle connection. I installed the Oracle Client 11g x64 successfully, I could even connect to the database using SqlPlus. My Visual Studio on the other hand disagreed. When I tried to configure a connection to my Oracle server I got the following error:

Exception: Attempt to load Oracle client libraries threw
BadImageFormatException. This problem will occur when running in 64
bit mode with the 32 bit Oracle client components installed

This was weird, after all I could connect to the database through SqlPlus, right? The problem is that VS2008 is 32 bit and as such it needs a 32 Oracle Client in order to connect to the db. When I installed the 32 bit client VS was able to connect to the db on the spot. So the only problem I had with Windows 7 so far had nothing to do with Windows 7, in fact you would run into the same situation in any other 64 bit version of Windows.

 

Comments

Posted by: Mehmet Özakan
On: 5/10/2010 3:27:10 AM

Hi Gabriel,

Your blog is worth to reading.

We faced to with the same situation at both platform windows 2008 R2 and Windows 7. You should reconfigure the compling options of your project that access to oracle db. If you installed 64bit Oracle Client on your client, change the Target CPU option to x64 at Page Properties --> Complie --> Advance Compile Options --> Target CPU, if you installed 32Bit Client, then change it to x86.

This will solve your problem.
Posted by: Laurent
On: 8/21/2009 10:49:55 AM

I have the same probleme with Windows 2008 server :-(
The application can only run in 32-bit with the 32 bits Oracle Client ?
Did you fix your problem with the 64 bit oracle client ?

Thanks a lot
Posted by: RL
On: 9/22/2011 1:02:36 AM

for those who are still suffering...

http://realfiction.net/go/153
Posted by: Gabriel Bogea
On: 8/21/2009 11:38:01 AM

Hi Laurent, the problem is that if you are using a version of an application that is 32bits this application won't be able to connect to Oralce using the 64bit client, it really needs the 32bit client.

I haven't tried this yet but I think that you may even have both versions of the client installed on your machine. So the 32bit client would be used by your 32bit apps and the 64bit client by your 64bit apps.

VisualStudio doesn't have a 64bit version so in order to use it with Oracle you will need the 32bit client. As far as I know there is no other way.

Leave your comment

Author

Email (never displayed)

Website

Comment  
HTML is NOT allowed. Use regular line breaks and those will be respected.