0

I have two versions of Oracle installed on my computer - a 64-bit version, and a 32-bit version I need to test a 32-bit web application. The app includes the 32-bit version of Oracle.DataAccess.dll that came with the 32-bit Oracle install.

When I run the app, it gets to:

OracleConnection conn = new OracleConnection(myConnectionString);
conn.Open();

but the Open call throws "Object reference not set to an instance of an object." I am pretty sure the problem is a 32/64-bit mismatch of some sort involving my local Oracle installs. Both versions are in my PATH variable, but the 64-bit one appears first.

Switching everything to 64-bit, or using the Managed Data Access driver, are not options because of legacy libraries that need to be included.

Is there a way to get the application to look at the 32-bit Oracle installation directory? Note that I am using VS 2019.

  • Check this one: https://stackoverflow.com/questions/24104210/badimageformatexception-this-will-occur-when-running-in-64-bit-mode-with-the-32#24120100 – Wernfried Domscheit Mar 07 '22 at 16:10

0 Answers0