Add data sources in the ColdFusion Administrator to define connection requirements for database queries.
When you add a data source, you assign it a name so that you can reference it within the CFQUERY tag on application pages to query databases. During a query, the data source tells ColdFusion which database to connect to and what parameters to use for the connection.
For example, you will add a data source that describes the ODBC requirements as well as login information when it is needed to make a connection to a database.
For information about the ColdFusion Administrator, ODBC, and data sources, refer to Chapter 13, Configuring ColdFusion Express Server.
![]() |
To add a data source: |
The Administrator prompts you for a password if you assigned one to the ColdFusion Server during install.
This database was installed in the CFusion directory under the root of your hard drive.
For example, the directory path on your machine may be:
C:\CFusion\Database\HRExpress.mdb
on Windows NT
The data source is added to the data source list.
If the data source was created, you should see this message:
The connection to the data source was verified successfully.
![]() |
Note: | Example code references the HRApp data source and the code that you write will reference the HRExpress data source. |