I've recently switched from Windows XP Pro x32 to Windows 7 Pro x64. Now, one of my scripts that uses an ODBC connection will no longer work.
As some of you may know, Windows 7 doesn't appear to have proper support for 32-bit ODBC connections if you go through "Control Panel->Administrative Tools->Data Sources (ODBC)". This is for 64-bit drivers, apparently. After some googling, I found that there is a way to set up 32-bit connections by running "C:\Windows\SysWOW64\odbcad32.exe". However, my script still won't work even though I set up the System DSN exactly like I did on my old computer. When I run my script, I get the following error:
Line 212 contains:
If it makes a difference, objConnection is created like so:
Since the error message mentions an "architecture mismatch", I wonder if you have to use a different connection string depending on how you set up the DSN (through the x64 interface or the the x32 interface).
Anyone have any ideas on what's going and how to correct it?
As some of you may know, Windows 7 doesn't appear to have proper support for 32-bit ODBC connections if you go through "Control Panel->Administrative Tools->Data Sources (ODBC)". This is for 64-bit drivers, apparently. After some googling, I found that there is a way to set up 32-bit connections by running "C:\Windows\SysWOW64\odbcad32.exe". However, my script still won't work even though I set up the System DSN exactly like I did on my old computer. When I run my script, I get the following error:
Script: X\XML_Check.vbs
Line: 212
Char: 3
Error: [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application.
Code: 80004005
Source: Microsoft OLE DB Provider for ODBC Drivers
Line 212 contains:
Code:
objConnection.Open "DSN=charge_codes_XLS;"
Code:
Set objConnection = CreateObject("ADODB.Connection")
Since the error message mentions an "architecture mismatch", I wonder if you have to use a different connection string depending on how you set up the DSN (through the x64 interface or the the x32 interface).
Anyone have any ideas on what's going and how to correct it?