VB6应用程序Oracle 12 64bit连接 [英] VB6 application oracle 12 64bit connection

查看:664
本文介绍了VB6应用程序Oracle 12 64bit连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有许多用VB6(不是.NET)编写的应用程序已经运行了近20年. 这些应用程序在Windows 2007 64位服务器上运行,并通过32位客户端连接到Oracle-11. 连接字符串包含"Provider = OraOLEDB.Oracle" 到目前为止,一切都很好.

We have a number of applications written in VB6 (not .NET) that have been running for almost 20 years. These applications are running on Windows 2007 64bit servers and connecting to Oracle-11 with a 32bit client. The connection string contains "Provider=OraOLEDB.Oracle" So far, so good.

问题在于,出于超出该线程范围的原因,我们需要转换为Oracle-12 64bit. 安装了Oracle 12客户端(并卸载了Oracle-11客户端)后,尝试打开连接时出现以下错误: 找不到提供程序.它可能未正确安装."

The problem is that we need to convert, for reasons that go beyond the scope of this thread) to Oracle-12 64bit. After having installed the Oracle 12-client (and disinstalled the Oracle-11 client), we get the following error when trying to open the connection: "Provider cannot be found. It may not be properly installed."

我确定我们已经安装了客户端,因此担心VB6无法使用64位客户端连接到Oracle.

I'm sure we did install the client and am therefore afraid that VB6 cannot connect to Oracle using the 64bit client.

不幸的是,似乎很简单的解决方案是不可能的:
-转换为.NET或其他任何版本,并在64位下编译
-保留32位oracle客户端.

Apparently easy solutions are unfortunately out of the question:
- Convert to .NET or whatsoever and compile under 64 bit
- Keep the 32bit oracle client.

有什么办法可以解决这个问题吗?

Any idea how to risolve this?

推荐答案

OLE-DB

好消息和坏消息;因为Visual Basic 6.0是没有64位编译器的32位程序,所以即使数据库本身在64位Oracle Database安装中的64位服务器上运行,也必须安装32 bit Oracle Data Access Components软件,特别是您需要而不是整个客户.

OLE-DB

Good news and bad; because Visual Basic 6.0 is a 32 bit program with no 64 bit compiler, the 32 bit Oracle Data Access Components software must be installed, even if the database itself is running on a 64 bit server in a 64 bit Oracle Database install, specifically you need the 32 bit Oracle Provider for OLE DB rather than the whole client.

可以在这里找到驱动程序(下载ODAC XCopy版本): http://www.oracle.com/technetwork/database/Windows/downloads/utilsoft-087491.html

The driver can be found here (Download the ODAC XCopy version): http://www.oracle.com/technetwork/database/windows/downloads/utilsoft-087491.html

以下线程描述了您的确切问题及其修复说明:

The following thread describes your exact problem and instructions on fixing it: https://hoopercharles.wordpress.com/2012/11/25/connecting-to-an-oracle-database-with-visual-basic-6-0-on-windows-8-64-bit/

另一种连接方法是改用ODBC驱动程序,每种方法都有优缺点,因此Google可以找到它们.

Another way to connect is to use ODBC drivers instead, there are pros and cons to each method so google to find them.

首先,您需要安装64位客户端或上面链接的ODAC随附的SQORA32 ODBC driver.

First you'll need to install the SQORA32 ODBC driver which comes with the 64 bit client or with the ODAC linked above.

接下来,您需要创建一个ODBC连接,可以在这里找到说明: https://tensix.com /2012/06/setting-up-an-oracle-odbc-driver-and-data-source/

Next, you'll need to create an ODBC connection, instructions can be found here: https://tensix.com/2012/06/setting-up-an-oracle-odbc-driver-and-data-source/

最后,您需要在VB6中更改连接字符串以使用新创建的ODBC连接.遵循以下内容应该可以正常工作(显然nameOfDatabase是为您的odbc连接指定的名称):

Finally you need to change your connections strings in VB6 to use the newly created ODBC connections. Something along the lines of the following should work nicely (obviously nameOfDatabase is the name given to your odbc connection):

Provider=MSDASQL;Dsn=nameOfDatabase;Uid=usernameHere;Pwd=passwordHere

设置DSN时请务必小心,请确保使用32位ODBC连接管理器,该管理器可在以下位置找到:

Be careful when you set up your DSN, make sure you use the 32 bit ODBC connection manager which can be found in the following location:

c:\windows\sysWOW64\odbcad32.exe

可以在system32文件夹中找到相同的程序,但是它是64位版本....一点也不混淆!

The same program can be found in the system32 folder but that's the 64 bit version....not confusing at all!

这篇关于VB6应用程序Oracle 12 64bit连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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