Program defensively against ODAC instantclient

安稳与你 提交于 2019-12-08 04:07:15

问题


I'm trying to isolate the oracle-client to the application by xcopying the instantclient and setting environment-variables for ORACLE_HOME and PATH in global.asax.cs as described here and here, but still get [OracleException (0x80004005): The provider is not compatible with the version of Oracle client] when running on the server. Is there some way to programmatically check client and provider to give a more descriptive error-message?

EDIT This post has a start. It lists three causes for the error.


回答1:


I did a blog post on this very thing. I used it in our DAL to prevent connections to non supported versions of Oracle.

https://tsells.wordpress.com/2011/05/12/oracle-11g-release-2-and-net-framework-4-0-and-version-checking/




回答2:


Use the managed oracle-client which is available now, then this question is irrelevant.



来源:https://stackoverflow.com/questions/5581752/program-defensively-against-odac-instantclient

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