我陷入了棘手的境地。我正在研究一个遗留的.NET应用程序,它使用ADODB(只有32位dll可用)和Oracle.DataAccess(32/64位可用),它在早期的2003服务器上运行,带有一些版本的Oracle(我不确定版本号)。
现在只需进行少量更改,我就需要将其移植到2012服务器(64位)和带有.NET 4.0的Oracle 11g上。当我使用64位Oracle客户端时,系统在ADODB失败。当我使用32位Oracle客户端时,它会显示The provider is not compatible with the version of Oracle client.
使用的环境/工具是: Oracle 11g,ODP.NET,ADODB,Windows 2012(64位),.NET 4.0
有没有办法解决这个谜语?
修改:
我尝试使用System.Data.OracleClient而不是ODP.NET我得到了以下异常
System.InvalidOperationException: Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed.