开发者

ODP app working for Oracle clients 10 and 11

I want to my app to work for target machines where the Oracle client could be 10 or 11. Is it possible to do it with ODP?

If in my app I reference Oracle.DataAccess.dll from my dev machine (i have ORA client11) - my app works only on target machines with client 11...

If I reference ODP from my client 10 - the app works only for machines with ORA client 10.

Is it possible to develop application(with ODP) which will work for both Oracle client versions 10, 11? I am asking for ORA client versions, not DB versions.

开发者_运维问答

Thanks!


I think the safest is to build on the lower of the two versions (so 2.102.2.20 or whatever of Oracle.DataAccess.dll).

In case of machines where the higher version is installed you can install a policy into the GAC (Global Assembly Cache). This policy file redirects applications that reference 2.102.2.20 to use the new version of ODP.NET (11.xxx.x.x).

With a normal Oracle Client installation this policy file should already be in your GAC, but if it's not, you should be able to find it in ORACLE_HOME\odp.net\PublisherPolicy\2.x.

You should be able to drag these policy files into your GAC (Start > Run > %systemroot%\assembly).

As long as the correct policy is in place your app built with version 10 should also run on the machine that has Oracle Client 11 installed.

Note: You can also create such a policy file yourself; take a look at this for more details

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜