Access DSN on 64bit Windows ColdFusion

In the x64 Windows Server 2003 environment, there are two ODBC registry keys. One key is used for the native 64-bit system (HKLM\Software\ODBC) and the other for 32-bit Windows on Windows applications (HKLM\Software\WoW6432Node\ODBC). An issue arises with 64-bit ColdFusion when an Access DSN is created because the corresponding registry key is placed in the 64-bit ODBC registry location (HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\<DSN NAME>). By default, ColdFusion reads the DSN registry key from the 32-bit location (HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432NODE\ODBC\ODBC.INI\<DSN NAME>). Any Access DSN created through the CF Admin will not work on Windows Server 2003 until a few small registry modifications are made.  To make the DSN work the registry keys for that source must be exported from the 64-bit location(HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\<DSN NAME>) to the 32-bit location. 

 

Before starting this article, backup the Windows Registry.  This is extremely important as not doing so could result in system failure.

  1. After creating the Windows Registry backup, log into CF admin and create the DSN entry as normal.
  2. Log into the server via Remote Desktop and open the Registry (Start > Run > regedit > OK).
  3. Find the DSN in the 64-bit location of the Registry: HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\<DSN NAME>
  4. Right-click and choose Export.
  5. Registry Export
  6. Save the key and ensure that Selected Brand is selected and defined correctly.
  7. Save Registry Key
  8. Open the exported registry key with Notepad of your favorite word editor and update all 64-bit references to 32-bit.
  9. Save the file.  Go back into the Registry Editor and select File > Import to import the new registry key.
  10. Import Registry Key
  11. If successful, the following message will appear:
  12. Registry Import Confirmation