Knowledgebase
[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

Instruction:

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 an 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 to 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.

QODBCStartMenu.png

Alternative if the 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 13.0.0.292 Onward, the DSN Name is changed to QuickBooks Data 64-bit QRemote

Click the "Configure" button to 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 you use to connect to QuickBooks. Ensure 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")
oConnection.Open "DSN=QRemote Data 64-bit;OLE DB Services=-2"

 

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, 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".

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please complete the captcha below (we use this to prevent automated submissions).