Oracle Client Error with VS 2019

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
jsteere
Posts: 2
Joined: Fri 20 Aug 2021 14:28

Oracle Client Error with VS 2019

Post by jsteere » Fri 20 Aug 2021 14:45

I currently support two applications that have been working fine for several years. We are trying to upgrade from Visual Studio 2015 to 2019 and the application now breaks as soon as it attempts to connect to the Oracle database. (Which is 12c)

I get the following message:

Exception of type 'System.Web.HttpUnhandledException' was thrown.
Cannot obtain Oracle Client information from registry. Make sure that Oracle Client Software is installed and that the bitness of your application (x86) matches the bitness of your Oracle Client, or use the Direct mode of connecting to a server.

The "Server Explorer" in VS 2019 is able to connect to the databases in question just fine, but not the application which fails in the constructor of the ORM designer. The version we are currently using is 9.9.887.0, but I think the problem is not the Devart version, but probably some missing step in the installation of Oracle ODAC or ODT, which is different in VS 2019. Researching the FAQ and other posts here, it seems that the registry entries are not set in HKEY_LOCAL_MACHINE\SOFTWARE\Oracle or HKEY_CURRENT_USER\SOFTWARE\Oracle, but I'm not sure why they are not set or what to do to correct the entries.

The Oracle.Web.dll is version 4.122.1.0
The installed version of ODT is 19.3.2

ODAC is supposed to be part of Visual Studio now. If I try to install any of the ODT with ODAC options from Oracle, it breaks my server explorer and doesn't fix the above issue.

Let me know if there is any other information you need to help resolve this issue.

DmitryGm
Devart Team
Posts: 152
Joined: Fri 11 Dec 2020 10:27

Re: Oracle Client Error with VS 2019

Post by DmitryGm » Wed 25 Aug 2021 15:20

As I understand your applications were connecting to an Oracle server in the OCI mode, which requires Oracle Client installed.

The error you are facing says that Oracle Client is not installed or the bitness of the application doesn't match to the bitness of the client.

1.) Install Oracle Client

2.) Configure the connection to your server in the tnsnames.ora file.

3.) Make sure that Platform target of your project matches to the bitness of Oracle Client. For example, if you had only installed Oracle for Windows (x64) 64-bit, the Platform target should be "x64" (not "Any CPU").

Image

jsteere
Posts: 2
Joined: Fri 20 Aug 2021 14:28

Re: Oracle Client Error with VS 2019

Post by jsteere » Wed 25 Aug 2021 19:48

Thank you,

That seems to be working.

Post Reply