甲骨文ODP.NET版本无关的替代 [英] Oracle ODP.NET version agnostic alternative
问题描述
我在执行在x64应用程序,连接到Oracle。
I am implementing an x64 application, connecting to Oracle.
我应该使用什么驱动程序,以确保它不会不管什么客户端版本的用户已经安装了。
What driver should I use, to make sure that it doesn't matter what client version the user has installed.
所以,现在我建我的版本与x64和x86 ODP.NET驱动程序,但我担心,当用户有Oracle客户端(ODP的旧/新的版本将无法正常工作。 NET)安装。
So, right now I'm building my versions with an x64 and x86 ODP.NET driver, but I'm worried that this won't work when the user has an older/newer version of the Oracle client (ODP.NET) installed.
我应该搬过来到OLEDB或System.DataAccess驱动程序,以避免这个问题,不然不会有是在所有的问题吗?
Should I move over to OleDB or System.DataAccess drivers, to avoid this problem, or won't there be a problem at all?
PS:我是previously使用ODBC驱动程序,但也有在x64这个已知的bug,所以这不是一个选项
PS: I was previously using the ODBC driver, but there are known bugs on x64 for this, so this is not an option.
推荐答案
甲骨文哦'欢乐'... 好了,基本上,我从来不屑与64位版本,我只是编译我的程序的32位专用,因此,如果这是一个困难的要求不是万能的,可以申请你。
Oh the 'joys' of Oracle... Ok basically, I never bothered with x64 versions, I just compiled my programs for 32 bits exclusively, so if that's a hard requirement not everything may apply for you.
但我怎么拿到的版本无关的是,根本就没有使用任何客户端安装的驱动程序;相反,我部署在我的应用程序目录都库Oracle即时客户端,和ODP二进制文件;在ODP将使用OCI(即时客户端)的文件,如果它们是可访问的。这是最简单的方法了,我很高兴我解决了它,很容易,虽然此信息,是不完全轻松抵达。
But how I got version agnostic was to simply not use any client-installed drivers; instead I deployed in my application directory both the libraries for Oracle Instant Client, and the ODP binaries; the ODP will use OCI (instant client) files if they are accessible. It was the easiest way out and I'm glad I solved it that easily, although the information for this wasn't exactly easily reachable.
在当前的版本(至少他们目前我上次构建的应用程序),11G,ODP和OCI的组合确保了与版本9-11兼容。
With the current versions (at least they were current when I last built the application), 11g, the combination of ODP and OCI ensured compatibility with versions 9-11.
现在,理所当然,OCI是pretty的大(中英文版本都会在只有35十岁上下如果没有记错MB的),但我不得不忍受它(部署不是一个大问题为了我)。此外,我曾在一个库,它已经是50上下的MB另一个依赖 - 其中大部分是XML序列化程序集!不要让我开始...
Now, granted, OCI is pretty big (the english-only version is smaller at 'only' 35-ish MB if memory serves), but I had to live with it (deployment wasn't a big problem for me). Besides I had another dependency on a library which was already 50-ish MB - most of it in XML serialization assemblies! Don't get me started...
希望这有助于!
这篇关于甲骨文ODP.NET版本无关的替代的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!