OracleConnection is throwing empty exception

一笑奈何 提交于 2019-11-29 12:13:31

So after installing all sort of versions of ODAC and searching to every single post related to this.

At the end Clean Install of the 32bit version was the solution.

  • First you need to unistall all your other oracle client you have ever installed.
  • After that, look for any ODAC version you want (latest if posible) but be sure to download the 32 bit version.

WHY?

Well is something related to the version in which Visual Studio is developed in. If you are developing a console application you will have not problem with the client version, but if you are using a web project then you definitely need the 32 bit version.

  • Finally be sure that all of your projects in visual studio the target platform is "32 bit"
  • and reference the new Oracle.DataAccess.dll that you have just installed

Please try re-formatting your connection string into this form and see how it works

<add name="LoisDataAccess" connectionString="Data Source=LOISPRD;Persist Security Info=True;User ID=ABC;Password=DEF" providerName="System.Data.OracleClient" />
Yahia

If the client you are using is an "Instant Client" then you might be better off by copying some Oracle-DLLs into your solution - for a walktrhough see this.

IF possible I would recommend to use a different .NET provider... in my experience most commercial ones are much less problematic than the Oracle .NET provider - see here on SO.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!