| Contents > Developing ColdFusion MX Applications > Accessing and Retrieving Data > Retrieving data |
|
|
|
|
||
You can query databases to retrieve data at runtime. The retrieved data, called the record set, is stored on that page as a query object. A query object is a special entity that contains the record set values, plus RecordCount, CurrentRow, and ColumnList query variables. You specify the query object's name in the name attribute of the cfquery tag. The query object is often called simply the query.
The following is a simple cfquery tag:
<cfquery name = "GetSals" datasource = "CompanyInfo"> SELECT * FROM Employee ORDER BY LastName </cfquery>
Note: The terms "record set" and "query object" are often used synonymously when discussing record sets for queries. For more information, see Using Query of Queries.
When retrieving data from a database, perform the following tasks:
cfquery tag on a page.cfquery block.cfoutput, cfgrid, cftable, cfgraph, or cftree.|
|
||
| Contents > Developing ColdFusion MX Applications > Accessing and Retrieving Data > Retrieving data |
|
|
ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting
Version 6.1
Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.