22
Chapter 3 Querying a Database
Adding data sources
You use the ColdFusion Administrator to add data sources to the ColdFusion
Administrator.
When you add a data source, you assign it a name so that you can reference it within
tags such as
cfquery
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.
Use the following procedure to add the CompanyInfo data source that you use in
many examples in this book.
Note
By default, the ColdFusion setup installs the CompanyInfo and cfsnippets databases
used in examples in this book and adds them to the available ODBC data sources.
Therefore, this procedure should not be necessary to work with examples in this
book.
To add a data source:
1
Start the ColdFusion Administrator.
On Windows, select
Start > Programs > ColdFusion Server > ColdFusion
Administrator
. On UNIX, enter the URL
hostname
/CFIDE/administrator
in
your browser.
The Administrator prompts you for a password if you assigned one to the
ColdFusion Server during the installation.
2
Enter a password to gain access to the Administrator.
3
Select ODBC under the Data Sources heading on the left menu.
Summary of Contents for COLDFUSION 5-DEVELOPING
Page 1: ...Macromedia Incorporated Developing ColdFusion Applications MacroMedia ColdFusion 5 ...
Page 58: ...38 Chapter 3 Querying a Database ...
Page 134: ...114 Chapter 7 Updating Your Database ...
Page 210: ...190 Chapter 10 Reusing Code ...
Page 232: ...212 Chapter 11 Preventing and Handling Errors ...
Page 238: ...218 Chapter 12 Using the Application Framework ...
Page 262: ...242 Chapter 12 Using the Application Framework ...
Page 278: ...258 Chapter 13 Extending ColdFusion Pages with CFML Scripting ...
Page 320: ...300 Chapter 15 Indexing and Searching Data ...
Page 336: ...316 Chapter 16 Sending and Receiving E mail ...
Page 374: ...354 Chapter 18 Interacting with Remote Servers ...