Query Notes and Considerations
When creating queries to retrieve data, keep these guidelines in mind:
- Enter the query NAME and DATASOURCE attibutes in the begin CFQUERY tag.
- Surround attribute settings with double quotes(").
- Reference the query data by naming the query in the CFOUTPUT tag later on the page.
- Make sure that a data source exists in the ColdFusion Administrator before you reference in a CFQUERY tag.
- The SQL that you write is sent to the database and performs the actual data retrieval.
- Columns and tables that you refer to in your SQL statement must exist otherwise the query will fail.
Move on to the next heading to learn more about what other variable data is stored with a query and how you may use it during debugging.