The provider is not compatible with the version of Oracle client sometimes (提供程序与此版本的 Oracle 客户机不兼容)
来源:互联网 发布:编程求出玫瑰花数 编辑:程序博客网 时间:2024/06/05 02:43
其实这个问题很直观,就是你在C#项目中使用的Oracal.DataAcess.dll文件的版本与你电脑上安装的ODAC.EXE(ODP.NET)版本不一致,不论是32位或者是64位平台不一致,还是版本的高低不一致,反正就是不匹配造成了问题。具体的解决办法网上有很多,这里就不再细讲。
但是这次我遇到的问题很奇怪。我的机器上都装了多个ODAC.EXE的版本,包括两个64位的,一个32位的,而且明明我在C#中使用的Oracle.DataAccess.dll的版本跟某个ODAC是完全一致的,但是还是抛出了The provider is not compatible with theversion of Oracle client sometimes这个异常,这让我很费解。而且更奇怪的是,这个异常并不是每次都抛出来,时而有时而没有,也就是说,我的代码与数据库的连接,一会能连上一会不能连上,全部靠运气。
找了很久,终于找到了问题的根源。因为这是一个遗留的项目,我下载到了本地,看到了这个项目中有圈起来的那几个文件,虽然觉得奇怪,我也没有在意太多。但是正是这几个文件,才造成了上述的问题。当我把这几个文件移除之后重新编译了一下,就一切正常了,能正常连接到数据库。所以,这次总结的道理就是,在有关Oracle的C#项目中,不要随便引入oci这些文件。(知道此刻我都不知道为什么前人做这个项目的时候会引入这几个文件。)
0 0
- The provider is not compatible with the version of Oracle client sometimes (提供程序与此版本的 Oracle 客户机不兼容)
- The provider is not compatible with the version of Oracle client
- “Oracle.DataAccess.Client.OracleException: 提供程序与此版本的 Oracle 客户机不兼容”问题的解决方案
- Oracle.DataAccess.Client.OracleException: 提供程序与此版本的 Oracle 客户机不兼容
- 解决GooglePlayStore提示您的设备与此版本不兼容(Your device isn't compatible with this version)
- AS版本与 gradle不兼容: This version of Android Studio is incompatible with the Gradle Plugin used.
- mvn install Geoserver under ubuntu10.04 时遇到的错误:the API of the mojo scanner is not compatible with this plugin version. 的解决方法
- Android Studio Error: Error:CreateProcess error=216, This version of %1 is not compatible with the v
- SLF4J: The requested version 1.5.8 by your slf4j binding is not compatible with [1.6]
- The requested version 1.6 by your slf4j binding is not compatible with [1.5.
- Ubuntu Error: the system network service is not compatible with this version
- The 'OraOLEDB.Oracle' provider is not registered on the local machine的原因
- The base class includes the field '...', but its type (...) is not compatible with the type of control (...)
- Genymotion:the app is not compatible with your genymotion
- SLF4J: The requested version 1.5.8 by your slf4j binding is not compatible with [1.6] SLF4J: See htt
- The Excel Connection Manager is not supported in the 64-bit version of SSIS, as no OLE DB provider i
- 解决:The 'OraOLEDB.Oracle.1' provider is not registered on the local machine.
- (System.Web.UI.HtmlControls.HtmlIframe) is not compatible with the type of control (System.Web.UI.Ht
- UVa 1602 Lattice Animals 网格动物
- JavaScript获取select元素下的每一个option
- 183. Customers Who Never Order (LeetCode, SQL)
- git 切换到develop分支时 提示error: The following untracked working tree files would be overwritten by check
- 欢迎使用CSDN-markdown编辑器
- The provider is not compatible with the version of Oracle client sometimes (提供程序与此版本的 Oracle 客户机不兼容)
- CxImage的编译及简单使用举例
- C#中类似Java中Map集合Properties的类Dictionary
- UVa 580 Critical Mass
- 温习小知识--mutex和spin lock的区别和应用
- APP压力测试入门教程
- MySQL行级锁、表级锁、页级锁详细介绍
- myeclipse新建项目流程
- 需求技能认定——需求捕获及需求分析初级