1

I am facing an issue with an excel macro which connects to an Oracle database. The macro works fine on many users PC's, but on one DAAS machine, it's giving me an error when attempting to open the connection:

OraOLEDBpus.dll: The specified module could not be found

And this error as well: An error was encountered when logging into the database Description: Provider cannot be found. It may not be properly installed.

This is the connection string, which I don't think is an issue because it works on 20+ other users PC's.

Conn1.Open ( _
"User ID=" & strUName & _
";Password=" & PWD & _
";Data Source=" & DSN & _
";Provider=OraOLEDB.Oracle" & _
";PwdChgDlg = 0")

The OS is Win 10 64 bit and Office version is 2016 32 bit. Oracle Client 12c 32-bit has been installed on this machine.

Any thoughts on why I may be getting this error?

Brian
  • 45
  • 1
  • 2
  • 9
  • Sounds like you may need to reinstall the Oracle client on that PC. I've seen registration issues with that same dll in older versions of the client: it might just need registering. – Tim Williams Dec 17 '20 at 03:44
  • Unfortunately, uninstalling and reinstalling did not fix the issue. – Brian Dec 18 '20 at 23:21
  • Did you install more than one Oracle client (including any privious installation)? What is the %PATH% variable? – Wernfried Domscheit Dec 19 '20 at 11:10
  • Check with https://learn.microsoft.com/en-us/sysinternals/downloads/procmon which files are actually loaded and where it fails. And again check **very** carefully the version of Oracle client and OleDb provider. – Wernfried Domscheit Dec 19 '20 at 11:13
  • Does ODBC for orecle appear in DAAS machine ?. – Saddam Meshaal Feb 11 '23 at 17:00

2 Answers2

0

There are different points you have to check.

  • The Oracle Provider for OLE DB needs to be installed. It is not part of the bare Oracle Instant Client.
  • An Oracle client must be installed. The Oracle Provider for OLE DB does not work stand-alone
  • It must be the same architecture (i.e. 32-bit vs. 64-bit) as your MS Office
  • It must be the same architecture as the Oracle client
  • The version of the Oracle Provider for OLE DB must be exactly the same version as the Oracle client

See 32-bit Oracle Data Access Components (ODAC) and/or 64-bit Oracle Data Access Components (ODAC)

Perhaps the Oracle Provider for OLE DB exist but is not properly registered, see How do I register a DLL file on Windows 7 64-bit?

Wernfried Domscheit
  • 54,457
  • 9
  • 76
  • 110
  • I verified each of the points you have indicated. No issues there. I tried registering the DLL and received an error message. Something to the effect of... The module was loaded but the entry-point was not found. Make sure that '.dll' is a valid DLL or OCX file and then try again. – Brian Dec 18 '20 at 23:27
  • I found that when the macro attempts to make the connection, the excel file gets uploaded to a SharePoint site. This is not coded anywhere in VBA so I'm wondering if it has something to do with this being a DAAS machine and everything being stored in OneCloud? I've moved the xlsm file to a local folder and tried running again, but still get the error and see it opens a SharePoint upload dialog box. – Brian Dec 18 '20 at 23:30
  • Have a look at https://stackoverflow.com/a/54330922/3027266 to check version and registration of the Ole Db Provider – Wernfried Domscheit Dec 19 '20 at 12:42
  • Thank you for your guidance. Unfortunately, I could not get the issue resolved. The user will be getting a new VM and we'll try again. – Brian Jan 16 '21 at 03:51
0

Install the 32 bit AccessDatabaseEngine.exe on this site.

Later, open cmd on this path with admin access. Execute this command;

AccessDatabaseEngine.exe /passive

  • Thank you for your guidance. Unfortunately, I could not get the issue resolved. The user will be getting a new VM and we'll try again. – Brian Jan 16 '21 at 03:51