Data Source Notes And Considerations; Retrieving Data; The Cfquery Tag - MACROMEDIA COLDFUSION 4.5-DEVELOPING WEB Develop Manual

Developing web applications with coldfusion
Table of Contents

Advertisement

20
The data source is added to the data source list.
9.
Locate
10. Choose Verify to run the verification test on the data source.
If the data source was created, you should see this message:
The connection to the data source was verified successfully.
For more information about managing data sources, See Administering ColdFusion
Server.

Data Source Notes and Considerations

When adding data sources to ColdFusion Server, keep these guidelines in mind:
Data source names should be all one word and begin with a letter.
Data source names can contain only letters, numbers and the underscore.
Data source names should not contain special characters.
Although data source names are not case-sensitive, you should use a consistent
capitalization scheme.
A data source must exist in the ColdFusion Administrator before you use it on
an application page to retrieve data.

Retrieving Data

You can query databases to retrieve data at runtime. When retrieving data from a
database:
You use the CFQUERY tag on a page to tell ColdFusion how to connect to a
database and how to store the retrieved data.
You write SQL commands inside the CFQUERY block to specify the data that
you want to retrieve from the database.
The retrieved data is stored on that page as a query variable.
You can reference the query variable data on that page in a CFOUTPUT block to
use its values.

The CFQUERY Tag

The CFQUERY tag is one of the most frequently used CFML tags. You use it in
conjunction with the CFOUTPUT tag so that you can retrieve and reference the data
returned from a query.
When ColdFusion encounters a CFQUERY tag on a page, it does the following:
Connects to the specified data source.
in the data source list.
CompanyInfo
Developing Web Applications with ColdFusion

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 4.5

Table of Contents