= Using ODBC (32-bit and 64-bit) on 64-bit Windows = 64-bit Windows has some surprising and counterintuitive setup and behavior around 32-bit and 64-bit ODBC. Many 64-bit environments still support 32-bit applications, and these require 32-bit ODBC drivers and DSNs, so it's important to understand how this all works. Both the 32-bit and 64-bit ODBC Administrator are named <b>odbcad32.exe</b>. They are differentiated by their filesystem location. The <b>32-bit ODBC Administrator</b> is found at <b><code>%systemdrive%/Windows/<nop>SysWoW64/odbcad32.exe</code></b>. This controls 32-bit ODBC drivers, which are required by 32-bit client applications. (The 32-bit ODBC Administrator <b><i>cannot</i></b> be accessed through the Control Panels interface; the <b>Data Sources (ODBC)</b> control panel is the 64-bit ODBC Administrator.) Counterintuitively, the <b>64-bit ODBC Administrator</b> is found at <b><code>%systemdrive%/Windows/System32/odbcad32.exe</code></b>. This controls 64-bit ODBC drivers, which are required by 64-bit client applications. (The 64-bit ODBC Administrator can also be accessed through the Control Panels interface, as the <b>Data Sources (ODBC)</b> control panel.) == Typical Paths to ODBC Administrators == | | <b>64-bit Windows</b> | <b>32-bit Windows</b> | | <b>64-bit Administrator</b> | <b><code><nowiki>C:\Windows\System32\odbcad32.exe</nowiki></code></b> %BR% or %BR% <b>Start</b> -> <b>Control Panels</b> -> <b>Data Sources (ODBC)</b> | n/a | | <b>32-bit Administrator</b> | <b><code><nowiki>C:\Windows\SysWoW64\odbcad32.exe</nowiki></code></b> %BR% <i>not a control panel</i> | <b><code><nowiki>C:\Windows\System32\odbcad32.exe</nowiki></code></b> %BR% or %BR% <b>Start</b> -> <b>Control Panels</b> -> <b>Data Sources (ODBC)</b> | Note that the 32-bit Administrator, and all 32-bit ODBC applications (typically installed to <b><code>%systemdrive%/Program Files (x86)/</code></b>), will list 64-bit User DSNs (that is, DSNs based on 64-bit ODBC drivers) -- <i>even though these DSNs and drivers cannot be used by the 32-bit tools/applications.</i> Likewise, the 64-bit Administrator, and all 64-bit ODBC applications (typically installed to <b><code>%systemdrive%/Program Files/</code></b>), will list 32-bit User DSNs (that is, DSNs based on 32-bit ODBC drivers) -- <i>even though these DSNs and drivers cannot be used by the 64-bit tools/applications.</i> System DSNs will only be seen by the applications and tools which can use them -- 32-bit DSNs for 32-bit applications, and 64-bit DSNs for 64-bit applications. For this reason among others, we strongly advise using only System DSNs in 64-bit environments. It can be tempting -- and in some ways useful -- to use identical names for 32-bit and 64-bit DSNs. This is fine -- but you then need to be <i>very</i> careful to keep the 32-bit and 64-bit DSN configurations in sync, as different output resulting from different configurations can lead to undesired and unexpected results in the end, especially in scenarios where tools invisibly mix 32-bit and 64-bit components (as some versions of Microsoft SQL Server and Visual Studio are known to do). == Related == * [[MsSqlOn64bitWin|Special Considerations when using Visual Studio and/or Microsoft SQL Server as the Data Consumer, on 64-bit Windows]]