Connection to Oracle through VBA no longer working

2019-09-08 09:46发布

问题:

I have been using this connection string:

 fn_Connection_String = "Provider=MSDAORA;Data Source=[address]:1521/orcl;User ID=xxx;Password=xxx"

...and it has been working fine. The IT company that works for my client has reported that the client is unable to use my software any longer, it is not connecting to the database. I test with the Oracle tools and all seems to be well, so I assume the problem is with the provider.

I tried this as well and was met with the same error but from different software:

fn_Connection_String = "Driver={Microsoft ODBC for Oracle}; " & _
    "CONNECTSTRING=(DESCRIPTION=" & _
    "(ADDRESS=(PROTOCOL=TCP)" & _
    "(HOST=[address])(PORT=1521))" & _
    "(CONNECT_DATA=(SERVICE_NAME=orcl))); uid=xxx;pwd=xxx;"

Does anyone have a clue what is going on? Maybe some updates broke something, or people have been mucking about in the environment?

It seems like the old ODBC connection no longer works, and there is an "oracle in instantclient" connector which works, but isn't working in VBA.

The message I'm getting is Oracle client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or later client software installation. Provider is unable to function until these component are installed

EDIT After posting I found that the IT company installed 2 drivers, version 11 something, and also instantclient, which is version 12 something. I tried using "Driver={Oracle in instantclient_12_1}; " (Since that is the driver name in the 32 bit ODBC connection manager) but that does not work.

回答1:

Microsoft released a patch on the 9th of Feb, which has been causing this issue.

Its now listed as a known issue.

https://support.microsoft.com/en-us/kb/3126587