从 Visual Studio 2010 使用 Oracle 需要什么? [英] What is needed for working with Oracle from Visual Studio 2010?

查看:32
本文介绍了从 Visual Studio 2010 使用 Oracle 需要什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从 Visual Studio 2010 使用 Oracle 需要什么?

What is needed for working with Oracle from Visual Studio 2010?

环境:1 - 在开发电脑上:

Environment: 1 - On development pc:

Windows 7 Ultimate 64 位(4 GB 内存,双核 2.6 GHz)

Windows 7 Ultimate 64 bit (4 GB ram, Dual-Core 2.6 GHz)

  • Windows 7 Ultimate 64 位(4 GB 内存,双核 2.6 GHz)
  • Visual Studio 2010 旗舰版
  • ODAC(来自 ODTwithODAC112012.zip 包)(ODAC10203x64.zip 也不会安装在 Windows 7 64 上)

2 - 在服务器上:

  • Windows 2003
  • Oracle 11g (11.2.0.1.0)
  • .NET(2.0、3.0、3.5、4.0)(安装了 SP)

问题:(简单)如果我在 vs 中创建一个控制台应用程序并将 .NET 版本设置为 3.5,并将平台设置为 x86,它可以在开发 PC 上运行,但不能在服务器上运行.如果我将平台设置为 x64 或任何 CPU,则不起作用;既不在开发电脑上,也不在服务器上(已部署).

Problem: (Simple) If i create a console app in vs and set .NET version to 3.5 and plateform to x86, it works on development pc but not on the server. If I set plateform to x64 or Any CPU, it does not work; neither on development pc nor on the server (deployed).

我已经搜索并发现 .NET 4 将在 12 月支持 ODP.NET (64).但我没有编译到 .NET 4.0!但是 .NET 3.5(在内部只是 .NET 2.0).其他教程和如何做"忽略了这个地狱的 32-64 方面的任何问题!

I have searched and found there will be .NET 4 support for ODP.NET (64) on December. But I am not compiling to .NET 4.0! But .NET 3.5 (Wich is internally just .NET 2.0). Other tutorials and 'how to's do ignore any problems with 32-64 aspect of this hell!

非常感谢!

推荐答案

服务器是否安装了 ODP 客户端软件?

Does the server have the ODP client software installed?

这可以是 32 位或 64 位.编译到 ANYCPU 应该没有关系(如果您使用的是 4.0,您现在必须使用 32 位,因为它似乎没有准备好 64 位).

This can be 32 or 64 bit. Compile to ANYCPU and it should not matter (if you were using 4.0 you would have to use 32bit for now since it doesn't seem to have the 64bit ready).

但是由于您运行的是 ODTwithODAC112012,您运行的是最新最好的 ODP(本地),因此您应该设置为 32 位运行.只要确保它安装在服务器上就可以了.如果已安装,您会收到什么错误?

But since you are running ODTwithODAC112012 you are running the latest and greatest ODP (locally) so you should be set for a 32 bit run. Just make sure it installed on the server and you should be set. if it is installed, what errors are you receiving?

以下是 oracle 站点上的一些论坛帮助:主题:oracle.dataaccess.dll 的中间语言版本&如何确定我的 Web 服务器是否为 ODP.Net 正确配置?

here are some forum help on the oracle site: Thread: Intermediate Language version of oracle.dataaccess.dll & How do I determine if my web server is correctly configured for ODP.Net?

验证已安装 ODP (%ora_home%11.2.0client_1odp.net).

Verify that ODP is installed (%ora_home%11.2.0client_1odp.net).

这篇关于从 Visual Studio 2010 使用 Oracle 需要什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆