Contents > Developing ColdFusion MX Applications > Introduction to Databases and SQL > Writing queries using an editor > Writing queries using Dreamweaver MX PreviousNext

Writing queries using Dreamweaver MX

This section describes how to define a query using the Dreamweaver MX Recordset dialog box, which allows you to create a record set without having to manually enter SQL statements. Defining a record set using this method can be as easy as selecting a database connection and table from the pop-up menus.

To define a record set without writing SQL:

  1. In the Dreamweaver Document window, open the page that will use the record set.
  2. To open the Data Bindings panel, select Window > Data Bindings.
  3. In the Data Bindings panel, click the Plus (+) button and choose Recordset (Query) from the pop-up menu.

    The Simple Recordset dialog box appears:


    This is a picture of the feature being described.
  4. Complete the dialog box.
  5. Click the Test button to execute the query and ensure that it retrieves the information you intended.

    If you defined a filter that uses parameters input by users, the Test button displays the Test Value dialog box. Enter a value in the Test Value text box and click OK. If an instance of the record set is successfully created, a table displaying the data from your record set appears.

  6. Click OK to add the record set to the list of available content sources in the Data bindings panel.

If you prefer to write your own SQL statements, or need to create more complex queries then the Simple Recordset dialog box allows, you can define record sets using the Advanced Recordset dialog box

Creating an advanced record set by writing SQL :

  1. In the Dreamweaver MX Document window, open the page that will use the record set.
  2. Choose Windows > Data Bindings to display the Data Bindings panel.
  3. In the Data Bindings panel, click the Plus (+) button and select Recordset (Query) from the pop-up menu.

    If the Simple Recordset dialog box appears, switch to the Advanced Recordset dialog box by clicking the Advanced button.

    The Advanced Recordset dialog box appears:


    This is a picture of the feature being described.
  4. Complete the dialog box.
  5. Click the Test button to execute the query and ensure that it retrieves the information you intended.

    If you defined a filter that uses parameters input by users, the Test button displays the Test Value dialog box. Enter a value in the Test Value text field and click OK. If an instance of the record set is successfully created, a table displaying the data from your record set appears.

  6. Click OK to add the record set to the list of available content sources in the Data Bindings panel.

Contents > Developing ColdFusion MX Applications > Introduction to Databases and SQL > Writing queries using an editor > Writing queries using Dreamweaver MX PreviousNext

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.

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/sql28.htm