How to change the driver of a ole_dbconnection from oracle_32bit to oracle_64bit

connectionsinstallationoledb

i have the connection string of:

connection= new OleDbConnection("Provider=OraOLEDB.Oracle;UserId=userid;Password=password;
Data Source=database;OLEDB.NET=true");

However after Oracle_64bit driver was installed on my computer in another process this doesn't work anymore. I read something about making a connection string like:

Driver={Oracle in OraClient12Home1_32bit};Dbq=database;Uid=userid;Pwd=password;"

I can't make that work however, and would like to hear if there's some simple fix for 32-bit to 64-bit of oledbconnection?

Best Answer

Even in this day and age, Windows is still reliant on the good, old-fashioned DOS PATH environment variable for finding dynamically linked libraries (DLLs).

It is possible that the 64-bit installation has altered the PATH variable (usually to insert its own location at the start of the "list"). This means that the 32-bit application, while searching through the DOS PATH, will find correctly-named 64-bit libraries before the 32-bit ones that it requires.