locked
Error connecting to Oracle database (64 bits driver ODAC with visual studio 2019) RRS feed

  • Question

  • I have installed the ODAC driver 12.2c Release 1 on the server and managed to create a linked server to the oracle database

    When connecting directly to the oracle database using ADO.NET (OracleClient Data Provider)

    the following error persists:

    Error in initializing provider. Attempt to load oracle client libraries threw badimageformatexception. This problem will occur when running in 64 bit mode with the 32 bit orcacle client components installed

    This while my project runs in 64-bit mode in visual studio2019

    Does anybody know how to solve this problem?

    Friday, April 10, 2020 11:34 AM

All replies

  • Install the 64 bit client software.

    If my reply solves your issue, please mark it as the answer

    Friday, April 10, 2020 3:37 PM
  • This while my project runs in 64-bit mode in visual studio2019

    Visual Studio is a 32 bit application. You may going to compile your application as 64 bit, but in VS during debugging it's 32 bit. You have to install both 32 and 64 bit of ODAC.


    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Saturday, April 11, 2020 4:17 PM
  • Hi giovi2012,

    May I know if you try to use Oracle Connection Manager to connect to oracle?

    There are following custom connection manager properties in the Oracle connection manager:

    EnableDetailedTracing: Not Used.

    OracleHome: Specify 32-bit Oracle Home name or folder to be used by the connector. (Optional)

    OracleHome64: Specify 64-bit Oracle Home name or folder to be used by the connector when running

    in 64-bit mode. (Optional)

    The following links will be helpful:

      Microsoft Connector for Oracle

      Oracle Connection Manager

    Best Regards,

    Mona


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Monday, April 13, 2020 3:00 AM
  • Thank you Jim I forgot to mention that I already installed the 64-bits driver when enduring this error
    Thursday, April 16, 2020 5:27 AM
  • Thank you very much nice to know this then I try to install 32-bits as well
    Thursday, April 16, 2020 5:28 AM
  • Hi,

    May I know if you have anything to update?

    Best Regards,

    Mona


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Thursday, April 16, 2020 10:10 AM