Creating a recordset without writing SQL
This section describes how to define a recordset using Dreamweavers Recordset dialog box, which allows you to create a recordset without having to manually enter SQL statements. Defining a recordset using this method can be as easy as selecting a database connection and table from the Recordset dialog boxs pop-up menus.
If you want to write your own SQL statements, use the advanced Recordset dialog box. (See Creating an advanced recordset by writing SQL.)
To define a recordset without writing SQL:
- In the Document window, open the page that will use the recordset.
- Select Windows > Bindings to display the Bindings panel.
- In the Bindings panel, click the Plus (+) button and select Recordset (Query) from the pop-up menu.
The simple Recordset dialog box appears. If you are developing a ColdFusion or ASP.NET site, the Recordset dialog box is slightly different from the example shown below. (If the advanced Recordset dialog appears instead, switch to the simple Recordset dialog box by clicking the Simple button.)
- Complete the dialog box.
For instructions on completing the Recordset dialog box, see the section appropriate to your document type:
- Setting the simple Recordset dialog box options.
- Setting the simple Recordset dialog box options (ColdFusion).
- Setting the simple DataSet dialog box options (ASP.NET).
- 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 recordset is successfully created, a table displaying data extracted from the recordset appears.
- Click OK to add the recordset to the list of available content sources in the Bindings panel.