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?


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.

  • So you're saying i could possibly look through the DOS PATH environment , and swap spots between 32-bit and 64-bit, so that my system will continue to use the 32-bit version? If yes, how do i then change this DOS PATH? – Levicia Sep 20 '19 at 12:55
  • @Levicia: Exactly right. You can see the PATH variable in a Command Prompt ("echo %PATH%"); it's fiddly to read, using semi-colon delimiters. To change it (assuming you're on Windows 10) search for "Edit the System Environment Variables"). Bear in mind, though, that the /real/ trouble starts when some of your applications need to use the 64-bit drivers bit some others still need the 32-bit ones! – Phill W. Sep 23 '19 at 7:08
  • Thanks, i feared that's what u meant. I already tried to change the path order, however it didn't yield a different result. I'll continue to see if i can find a way to use 64-bit driver instead :) – Levicia Sep 24 '19 at 10:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.