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

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4376892/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 22:08:15  来源:igfitidea点击:

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

visual-studiooraclewindows-764-bitodp.net

提问by Kaveh Shahbazian

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

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

Environment: 1 - On development pc:

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

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

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

  • Windows 7 Ultimate 64 bit (4 GB ram, Dual-Core 2.6 GHz)
  • Visual Studio 2010 Ultimate
  • ODAC (from package ODTwithODAC112012.zip) (also ODAC10203x64.zip does not install on Windows 7 64)
  • Windows 7 Ultimate 64 位(4 GB 内存,双核 2.6 GHz)
  • Visual Studio 2010 终极版
  • ODAC(来自 ODTwithODAC112012.zip 包)(ODAC10203x64.zip 也不会安装在 Windows 7 64 上)

2 - On server:

2 - 在服务器上:

  • Windows 2003
  • Oracle 11g (11.2.0.1.0)
  • .NET (2.0, 3.0, 3.5, 4.0) (SPs are installed)
  • 视窗 2003
  • Oracle 11g (11.2.0.1.0)
  • .NET(2.0、3.0、3.5、4.0)(安装了 SP)

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).

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

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!

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

Many thanks in advance!

提前谢谢了!

采纳答案by Harrison

Does the server have the ODP client software installed?

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

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).

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

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?

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

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?

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

Verify that ODP is installed (%ora_home%\11.2.0\client_1\odp.net).

验证是否安装了 ODP (%ora_home%\11.2.0\client_1\odp.net)。