4 Replies Latest reply on Sep 19, 2012 2:13 PM by Tridus

    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:

      +**{System.InvalidOperationException: 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. ---> System.BadImageFormatException: An attempt was made to load a program with an incorrect format.**+
      I didn't install 32bit oracle client, i don't know from where it is taking it.

      I tried to change the platform of my project x86 or x64 as well but still same

      i tried every possible thing to resolve the issue but still it is consuming a 32bit Oracle client

      Can anyone have an idea how to fix this issue ??

      Edited by: 951019 on Aug 6, 2012 2:39 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
        • 1. Re: Windows 7 x64 and Oracle Client
          This error is due to :
          * either a bad platform choice (for example you installed 32 bits version and your .NET program runs on 64 bits (AnyCPU or x64 platform))
          * or a bad installation of ODP.NET

          Otherwise it works well on Win 7 x64. I installed both middlewares ODAC 32bits and ODAC 64bits.
          • 2. Re: Windows 7 x64 and Oracle Client
            Alex Keh - Product Manager-Oracle
            I assume you are not trying to use Oracle Developer Tools for Visual Studio. That is available only in 32-bit because Visual Studio itself is 32-bit only.

            Otherwise, the most likely error is what CITnDev suggested. My guess is on the first suggestion, that your .NET project is set to build as AnyCpu or 32-bit, but then trying to use 64-bit ODP.NET.
            • 3. Re: Windows 7 x64 and Oracle Client
              I also encountered Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when running in 64bit mode with 32 Oracle client when I tried to add connection to Oracle database in Visual studio 2010 Ultimate. Prior to that I have added reference to Oracle Data Access in Oracle client 11.2

              <add assembly="Oracle.DataAccess, Version=, Culture=neutral, PublicKeyToken=89B483F429C47342"/></assemblies></compilation>

              I have no issue in ect to the oracle database using Oracle Net Config Assistant.

              My computer run Windows 7 Profession in 64 bit CPU.

              I am quite sure that the oracle client installed in my computer is 64bit , as the processor architecture of " Oracle.DataAccess, Version= " in my Windows assembly folder show as AMD64.

              I have attempted to install ODAC1120320_x64, it gave the same problem?

              Is there any solution?
              • 4. Re: Windows 7 x64 and Oracle Client
                This can also happen in reverse - you're running something in 32 bit (Visual Studio) and telling it to try and use 64 bit Oracle assemblies. That's going to fail.

                Should be fixed if you also install the 32 bit Oracle client into a new home.