[QODBC-Desktop] How to Run VB Script on 64-bit Operating System
Posted by Rajendra Dewani (QODBC Support) on 11 January 2013 09:48 AM
How to Run VB Script on 64-bit Operating System
When running the VB Script on the 64-bit system, if you directly run the Script by double-clicking the vbs file, the system will run the VB Script as 64-bit. Then QODBC will report error like this: "[Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application"
There are two solutions, You need to either use QRemote relate DSN in your connection string or manually run VB Script under 32-bit mode to solve this problem.
Solution 1 "Using QRemote":
To use QRemote in your connection, you need first have one QODBC DSN that can connect to QuickBooks without any problem.
Then run QRemote Server:
Note down the IP Address on your QRemote Server.
Click Start -- > All Programs -- > QODBC Driver for use with QuickBooks -- > Configure QODBC Data Source 64-bit.
Alternative if above menu is not available: Go to 64-bit ODBC manager at C:\Windows\System32\odbcad32.exe:
In the "System DSN" tab, find "QRemote Data 64-bit":
QODBC 126.96.36.1992 Onward the DSN Name is changed to QuickBooks Data 64-bit QRemote
Click "Configure" button, set up this DSN:
In this window, the "Server" is the IP Address you get from QRemote Server. The "Remote DSN" is the QODBC DSN that you use to connect to QuickBooks. Make sure the DSN you assigned in this option is available to access QuickBooks.
After the QRemote DSN is configured, please use this DSN in your connection string instead of using QODBC DSN like this:
Set oConnection = CreateObject("ADODB.Connection")
Solution 2 "Set VB Script to Run as 32-bit":
To do this, please follow the steps below:
Please follow the steps below:
1) Click Windows Start
2) Click Run, in the window, type "%windir%\SysWoW64\cmd.exe"
3) Click OK, then navigate to the folder where you store your VBS file, or move your VBS file to C:\Windows\SysWOW64.
4) Type "cscript Filename.vbs" in the cmd window. For example, if you have a vbs file named test.vbs, then type the command like this: "cscript test.vbs".