Dreamweaver

Define a recordset in a CFC

Dreamweaver can help you define a recordset (also known as a ColdFusion query) in a ColdFusion component (CFC). By defining a recordset in a CFC, you don’t need to define the recordset on each page that uses it. You define the recordset once in the CFC and use the CFC on different pages.
Note: This feature is available only if you have access to a computer running ColdFusion MX 7 or later. For more information, see Enable the ColdFusion enhancements.
  1. Create or open an existing CFC file in Dreamweaver.
  2. In the Bindings panel (Window > Bindings), click the Plus (+) button and select Recordset (Query) from the pop‑up menu.

    The Recordset dialog box appears. You can work in either the simple or the advanced Recordset dialog boxes.

  3. To use an existing function in the CFC, select the function from the Function pop‑up menu and skip to step 5.

    The recordset is defined in the function.

  4. To define a new function in the CFC, click the New Function button, enter a name for the function in the dialog box that appears, and then click OK.

    The name must contain only alphanumeric characters and underscores (_).

  5. To define a recordset for the function, complete the Recordset dialog box options.

    The new function is inserted into the CFC that defines the recordset.