Using ColdFusion Studio
|
|
Chapter 7 : Accessing ColdFusion Data Sources
|
Inserting SQL into a Page
You can use any of the following methods to insert a query directly into a CFML page from the SQL Builder:
- If you open the SQL Builder from the CFQUERY tag editor, it prompts you to insert the query when you close the editor.
- If you open the SQL Builder from a CFML page, it prompts you to insert the query when you close it.
- To insert just the SQL statement, click the Copy SQL to Clipboard button on the toolbar. Close the SQL Builder and paste the SQL into your page. You will be prompted to save the query.
- To insert the SQL statement within a CFQUERY tag, click the Copy CFQUERY button. Close the SQL Builder and paste the query into your page. You will be prompted to save the query.
 |
To insert a saved query:
|
Use either of the methods listed below.
- Open the data source schema in the Database tab.
- Open the Queries folder in the data source you want to use.
- Drag and drop the query onto the page.
OR
- Click the CFQUERY button on the CFML Basic tag toolbar or select CFQUERY from the Tag Chooser (Ctrl + E).
- Enter a name for the query.
- Click the Insert Query button.
- Choose a server from the select box.
- Open the Queries folder in the data source you want to use.
- Select a query and click Insert.
- Click Apply in the CFQUERY tag editor.
Copyright © 1999, Allaire Corporation. All rights reserved.
|
|