Setting the simple Recordset dialog box options (ColdFusion)

This dialog box defines a recordset for ColdFusion document types as a source of dynamic content without you having to hand code SQL statements.

To set the simple Recordset dialog box options for ColdFusion:

  1. In the Name text box, enter a name for the recordset.

    A common practice is to add the prefix rs to recordset names to distinguish them from other object names in your code. For example: rsPressReleases

    Note that recordset names can only contain letters, numbers, and the underscore character (_). You cannot use special characters or spaces.

  2. If you're defining a recordset for a ColdFusion component (that is, if a CFC file is currently open in Dreamweaver), select an existing CFC function from the Function pop-up menu, or click the New Function button to create a new function.

    The recordset will be defined in the function. For more information, see Defining a recordset in a ColdFusion component.

  3. Select a data source from the Data Source pop-up menu.

    If no data source appears in the pop-up menu, you will need to create a ColdFusion
    data source.

  4. In the Username and Password text boxes, enter the user name and password for the ColdFusion application server if required.

    Data sources in ColdFusion may require a user name and password to access them. If you do not have the user name and password to access a data source in ColdFusion, contact your organization's ColdFusion administrator.

  5. In the Table pop-up menu, select the database table that will provide data to the recordset.

    The Table pop-up menu displays all tables in the specified database.

  6. To include a subset of the table's columns in the recordset, click Selected and choose the desired columns by Control-clicking (Windows) or Command-clicking (Macintosh) them
    in the list.
  7. You can further limit the records returned from the table by creating a filter:
  8. If you want the records to be sorted, select a column to sort by, and then specify whether the records should be sorted in ascending (1, 2, 3... or A, B, C...) or descending order.
  9. Click Test to connect to the database and create an instance of the data source.

    A table appears displaying the returned data. Each row contains a record and each column represents a field in that record. Click OK to close the test recordset.

  10. Click OK.

    The newly defined ColdFusion recordset appears in the Bindings panel.

Related topics