I am struggling to get my 32-bit Excel (click-to-run) to use my 32-bit Oracle OLEDB provider. I know the Oracle client is correctly installed as I have a separate 32-bit .NET application that can connect to my Oracle database with the OLEDB provider without any issues. In Excel I can see the provider listed but when I select it and press the Next button I get an error saying that it cannot find the OraOleDBpus12.dll file. The file definitely exists in the client bin folder however.
I have run procmon to see if it would shed any light on what is going on and it confirms that everything is correctly in 32-bit-ness. It also presents a clear picture of how Office click-to-run manages its virtualized environment and I can see it correctly using the PATH environment variable to locate files. I should also say at this point that the first entry on my PATH variable is the Oracle client bin folder. The output all looks like it is doing what it is supposed to until it reaches a certain point in the logging when, for some reason, it stops looking in the Oracle client bin folder as part of the search sequence and just goes straight to C:\Windows\SysWOW64. Both of these situations are shown below.
In order to further check that the problem lies with how Office is attempting to load the provider, I manually copied the OraOleDBpus12.dll into C:\Windows\SysWOW64 and tried again. This time Excel complained about not being able to find a different file, OraOleDB12us.dll. I copied that into C:\Windows\SysWOW64 and tried once more. The result on this occasion was a very different message, claiming that it could not determine the text for a specific message, most likely because Excel had also failed to correctly map the Oracle client oledb\mesg folder contents to its virtual environment.
Is this a bug? If not, then why does Excel stop using the PATH environment variable to locate files part way through the process?
I'm using:
Windows 10 Pro version 1903 OS Build 18362.239
Microsoft Excel for Office 365 MSO (16.0.11901.20070) 32-bit
Oracle 12.2.0 client 32-bit.
Thanks in advance
Michael