简体   繁体   English

使用32位进程中的64位Oracle Client连接Oracle DB

[英]Connect Oracle DB using 64 bit Oracle Client from 32 bit process

I have application running in 32 bit mode. 我的应用程序以32位模式运行。 it tries to connect oracle DB using Oracle Client. 它尝试使用Oracle Client连接oracle DB。 Oracle Client is running in 64 bit. Oracle Client以64位运行。

string connectionString = @"Data Source=" + oracleDBName + ";User id=" + oracleDBUserId +";Password=" + oracleDBPwd +";";
            OracleConnection con = new OracleConnection(connectionString);
            try
            {
                con.Open();
                if (con != null)
                {
                    con.Open();
                }
                return true;
            }
            catch (OracleException)
            {
                return false;
            }

I am getting targetinvocationexception when i call 我打电话时收到targetinvocationexception

con.Open(); con.Open();

Reason, It is not able to load 64 bit dll since the application is running in 32 bit mode. 原因,由于应用程序以32位模式运行,因此无法加载64位dll。

I cannot change the application mode. 我无法更改应用程序模式。 I also cannot install the 32 bit Oracle client. 我也无法安装32位Oracle客户端。 How to solve this problem 如何解决这个问题呢

Thanks in Advance 提前致谢

Oracle driver for .NET "requires native" client from Oracle. 用于.NET的Oracle驱动程序“需要Oracle提供本机”客户端。 (It's not Java, where thin client exists) (不是Java,瘦客户机存在)

Try instant client, it doesn't require installation. 试试即时客户端,它不需要安装。 http://www.oracle.com/technetwork/topics/winsoft-085727.html http://www.oracle.com/technetwork/topics/winsoft-085727.html

Also, you can try ODBC .NET driver, but configure ODBC DSN to use Oracle driver from Microsoft (most windows installation has microsoft's odbc driver for oracle out of the box). 另外,您可以尝试使用ODBC .NET驱动程序,但是将ODBC DSN配置为使用Microsoft的Oracle驱动程序(大多数Windows安装都开箱即用了Microsoft的oracle odbc驱动程序)。 Again: 再次:
1) for 32bit application you need 32bit version of ODBC 1)对于32位应用程序,您需要32位版本的ODBC
2) oracle instant client should be available in the search path 2)oracle即时客户端应该在搜索路径中可用

In Windows 64bit there are two versions of ODBC admin panels for 32bit and 64bit applications. 在Windows 64位中,有两种版本的ODBC管理面板用于32位和64位应用程序。 To run 32b version execute C:\\Windows\\SysWOW64\\odbcad32.exe. 要运行32b版本,请执行C:\\ Windows \\ SysWOW64 \\ odbcad32.exe。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在安装了32位Oracle客户端的情况下以64位模式运行 - Running in 64 bit mode with the 32 bit Oracle client installed VS 2012中的64位应用程序将无法连接到Oracle 11g 64位db吗? - 64bit application in VS 2012 will not connect to Oracle 11g 64bit db? 如何在我的项目32位应用程序C#中包括oracle客户端64位版本 - how to include oracle client 64 bit version in my project 32 bit application c# 在64位计算机上以32位模式运行Oracle客户端 - Run Oracle Client in 32-bit mode on a 64-bit machine 使用32位Oracle Service在64位模式下运行 - Running in 64 bit mode with the 32 bit Oracle Service 无法从32位客户端连接到64位计算机上的MQSeries服务器 - Unable to connect to MQSeries server on 64 bit machine from 32 bit client 从32位应用程序获取64位应用程序的过程信息 - Getting process information of a 64 bit application from 32 bit application 从 32 位 Windows 服务使用 64 位进程外 COM DLL - Using 64-bit out of process COM DLL from 32-bit Windows Serivce System.Data.OracleClient无法与64位Oracle Client一起使用 - System.Data.OracleClient not working with 64 bit Oracle Client Windows 服务器 2016 以不同方式将日期传递给 Oracle 64 位客户端 - Windows Server 2016 Passing Dates Differently to Oracle 64 bit Client
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM