2
votes

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:

<?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

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.

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.

2
The architecture of the browser is irrelevant. The error is coming from your installation of PHP. Note that the MAS90 product has been superseded by Sage 100 ERP, which includes an option to use MSSQL as a database. You might find that an upgrade and change of database is appropriate, since MSSQL is readily supported by PHP.user1864610
I am aware that we are not using the latest Sage software, unfortunately management is not interested in upgrading yet as they just purchased the 4.40 version that we are currently using and they cost many $$$$. Is there a way to make the PHP installation use 32bit drivers?Lord Martlet

2 Answers

0
votes

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.

0
votes

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.

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.

Hope that helps.