Error in Connecting Visual Studio 2019 with Oracle 19c

3.5k views Asked by At

I have installed oracle 19c 64 bit version on my computer. And I have installed Visual Studio 2019. Below are the details of my visual studio installation.

Microsoft Visual Studio Community 2019 Version 16.9.4

I have created my database and I am working on my database by connecting through SQL Developer.

But here I am trying to connect to my database from visual studio like in below screen captures.

enter image description here

It gives me below error.

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.

enter image description here

Can anyone point me out how to solve the error?

1

There are 1 answers

0
cha On

I had the same problem before. Here's what I've done to solve that.

  1. Download and install Oracle Database 19c Client for Windows (32bit). - NT_193000_client_home.zip https://www.oracle.com/ph/database/technologies/oracle19c-windows-downloads.html?fbclid=IwAR1QVvYUodfPEF6o5BGglsaMfgZQJVKoszyA_nKt_G6Ff2HD6_UNWFSZxpg
  2. Restart your windows after you're done installing.
  3. Open your Visual Studio 2019
  4. Open your project, then go to the Build tab. Then click configuration manager.
  5. Click on combo box of the Active solution platform, then click New, then select x86 platform.

You can now add a new database connection after that. I hope it will work for you.