My company uses Mas90 software which connects to an ODBC database that only uses a 32bit driver. I am trying to create a web page that will connect to this database to update our website. The issue that I am running into is that we use 64bit computers and the browser seems to only want to connect to 64bit drivers. Here is the code we are using:
我的公司使用Mas90软件连接到仅使用32位驱动程序的ODBC数据库。我正在尝试创建一个将连接到此数据库以更新我们网站的网页。我遇到的问题是我们使用64位计算机,浏览器似乎只想连接到64位驱动程序。这是我们使用的代码:
<?php
$conn = new COM("ADODB.Connection");
$conn->open("DSN=MasSystemDSN;UID=USER|COMPANY;PWD=PASS;Directory=\\server\MAS 90\MAS90;SERVER=NotTheServer;");
?>
I get this error:
我收到此错误:
( ! ) Fatal error: Uncaught exception 'com_exception' with message 'Source: Microsoft OLE DB Provider for ODBC Drivers Description: [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application' in C:\wamp\www\Product Integration\TestMas.php on line 4 ( ! ) com_exception: Source: Microsoft OLE DB Provider for ODBC Drivers Description: [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application in C:\wamp\www\Product Integration\TestMas.php on line 4
(!)致命错误:带有消息的未捕获异常'com_exception''源:用于ODBC驱动程序的Microsoft OLE DB提供程序说明:[Microsoft] [ODBC驱动程序管理器]指定的DSN包含C:\中驱动程序和应用程序之间的体系结构不匹配第4行的wamp \ www \ Product Integration \ TestMas.php(!)com_exception:源:用于ODBC驱动程序的Microsoft OLE DB提供程序说明:[Microsoft] [ODBC驱动程序管理器]指定的DSN包含驱动程序和应用程序之间的体系结构不匹配第4行的C:\ wamp \ www \ Product Integration \ TestMas.php
I know about the 32bit ODBC driver manager residing at SysWow64 rather than the 64bit manager at System32. I have seen many similar questions of this type where the solution is to delete the 32bit DSN and create a 64bit DSN. Unfortunately that is not an option for me as there is no driver for a 64bit DSN available for my database.
我知道驻留在SysWow64的32位ODBC驱动程序管理器而不是System32的64位管理器。我已经看到很多类似的问题,其中解决方案是删除32位DSN并创建64位DSN。不幸的是,这对我来说不是一个选项,因为我的数据库没有可用于64位DSN的驱动程序。
So is there a way to write my code so that it runs the 32bit drivers? Or a way to run the browser so that it will run the 32bit drivers? Any other ideas? Thank you.
那么有没有办法编写我的代码,以便运行32位驱动程序?或者一种运行浏览器以便运行32位驱动程序的方法?还有其他想法吗?谢谢。
2 个解决方案
#1
0
Look on the net for products called ODBC-ODBC Bridge. They allow a 64 bit application to talk to a 32 bit driver and vice versa.
在网上查找名为ODBC-ODBC Bridge的产品。它们允许64位应用程序与32位驱动程序通信,反之亦然。
#2
0
Depending on your version of MAS, you may have a 64 bit driver available, but you have to install it. See this article for good directions: https://sagecity.na.sage.com/support_communities/sage100_erp/f/sage-100-technical-and-installation-discussions/84394/excel-64-bit-query. Versions 2013 and later have the 64 bit ODBC driver available.
根据您的MAS版本,您可能有64位驱动程序,但您必须安装它。请参阅此文章以获取更好的指示:https://sagecity.na.sage.com/support_communities/sage100_erp/f/sage-100-technical-and-installation-discussions/84394/excel-64-bit-query。版本2013及更高版本具有64位ODBC驱动程序可用。
Barring that, I've usually configured my .NET applications (or at least the component that actually communicates with MAS) as a 32 bit application. That forces it to use the 32 bit ODBC. I know you're using PHP, so that may not be an option for you.
除此之外,我通常将我的.NET应用程序(或至少与MAS实际通信的组件)配置为32位应用程序。这迫使它使用32位ODBC。我知道你正在使用PHP,所以这可能不适合你。
Hope that helps.
希望有所帮助。
#1
0
Look on the net for products called ODBC-ODBC Bridge. They allow a 64 bit application to talk to a 32 bit driver and vice versa.
在网上查找名为ODBC-ODBC Bridge的产品。它们允许64位应用程序与32位驱动程序通信,反之亦然。
#2
0
Depending on your version of MAS, you may have a 64 bit driver available, but you have to install it. See this article for good directions: https://sagecity.na.sage.com/support_communities/sage100_erp/f/sage-100-technical-and-installation-discussions/84394/excel-64-bit-query. Versions 2013 and later have the 64 bit ODBC driver available.
根据您的MAS版本,您可能有64位驱动程序,但您必须安装它。请参阅此文章以获取更好的指示:https://sagecity.na.sage.com/support_communities/sage100_erp/f/sage-100-technical-and-installation-discussions/84394/excel-64-bit-query。版本2013及更高版本具有64位ODBC驱动程序可用。
Barring that, I've usually configured my .NET applications (or at least the component that actually communicates with MAS) as a 32 bit application. That forces it to use the 32 bit ODBC. I know you're using PHP, so that may not be an option for you.
除此之外,我通常将我的.NET应用程序(或至少与MAS实际通信的组件)配置为32位应用程序。这迫使它使用32位ODBC。我知道你正在使用PHP,所以这可能不适合你。
Hope that helps.
希望有所帮助。