404 Tech Support

Understanding ODBC connections in a Windows 7 32bit and 64bit world

ODBC connections in Windows (found as “Data Sources (ODBC)” in the Control Panel, under Administrative tools) are required for connecting an application to a database through a database driver. When configured, they can hum along just fine and work splendidly as long as they don’t change and the connection details on the database-side do not change. They can be complicated enough to setup with a few details to know like database driver, server name, and the different user name and password assigned to the client. However, with 64-bit versions of Windows, the process actually became a little bit more complicated.

If you’re running Windows 7 32-bit, there is not much to it you wouldn’t expect. Running 32-bit applications and configuring 32-bit ODBC connections, things work pretty straightforward – you configure the connection through the Control Panel and the application works.

In Windows 7 64-bit, however, you can run 32-bit or 64-bit applications. When you go to Control Panel, Administrative Tools, Data Sources (ODBC), you are launching the 64-bit ODBC configuration tool. If an application is 32-bit, it will not be able to see or use database connections configured there under the System DSN.

The User DSN tab shows all connections configured under 32-bit and 64-bit ODBC. The System DSN tab only shows those connections configured under the respective version.

If you run Windows 7 64-bit and need to configure a database connection for a 64-bit application, you just go under the Control Panel like normal. If your application is 32-bit, you will need to find the application under C:WindowsSysWoW64Odbcad32.exe to configure a database connection for 32-bit applications.

For more advanced use, you might be looking directly in the registry to backup and restore ODBC connections. You can find those values here:

It doesn’t make things too complicated but with mostly 32-bit applications on a 64-bit operating system in my environment, this is definitely something to be aware of.

For more details, see this related Microsoft KB article.