This guide explains how to configure ODBC (Open Database Connectivity) in Adobe ColdFusion to enable seamless connectivity between ColdFusion and various databases. While ColdFusion primarily supports JDBC, it is still possible to use ODBC through ColdFusion ODBC Services or JDBC-ODBC bridges.
1. Ensure ODBC Services Are Installed and Running
Before using ODBC in ColdFusion, ensure that the ODBC services are installed and running. ColdFusion 2021 requires these services to be manually installed. Follow the steps below to install and restart the necessary ODBC services.
Steps:
1. Open Command Prompt as Administrator
- Go to the Start Menu and search for Command Prompt.
- Right-click on it and select Run as Administrator to open the command prompt with elevated privileges.
2. Reinstall ODBC Services
- Run the following commands to reinstall ODBC services for ColdFusion:
- ColdFusion2021\cfusion\bin\cfpm.bat uninstall odbc
- ColdFusion2021\cfusion\bin\cfpm.bat install odbc
3. Restart ColdFusion ODBC Server and Agent
After installing the ODBC services, restart the ColdFusion ODBC Server and ColdFusion ODBC Agent:
- Open the Windows Services Manager by typing services.msc in the Run dialog (press Win + R).
- Find and restart both services.
Once the ODBC services are up and running, the next step is to configure an ODBC data source. Follow these steps to set up your ODBC Data Source Name (DSN) in ColdFusion.
Steps:
1. Open ColdFusion Administrator
Open your ColdFusion Administrator by navigating to the following URL in your browser:

Note: The port number may vary depending on your configuration.
2. Navigate to Data & Services
In the ColdFusion Administrator interface, go to Data & Services → Data Sources.
3. Add a New Data Source
Click on Add New Data Source and provide a name for your data source (DSN).
4. Select ODBC Socket as the Driver Type
From the available driver types, select ODBC Socket.
5. Enter the ODBC System DSN
Click Add, then enter the Windows ODBC System DSN that you previously created in the ODBC Data Source Administrator tool.

6. Save and Test the Connection
Save the settings, and then click Test Connection to ensure that ColdFusion can successfully connect to the data source.
3. Using ODBC in ColdFusion Queries
After configuring the ODBC data source, you can now use it in your ColdFusion queries with the <cfquery> tag.
With these steps, you've successfully configured ODBC in Adobe ColdFusion and can start using it to interact with your databases.