Setting the CFC Query dialog box options

Setting the CFC Query dialog box options

The purpose of this dialog box is to define a recordset as a source of dynamic content in Dreamweaver using a ColdFusion component containing a recordset definition.

To set the dialog box options:

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

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

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

  2. Select a package from the ones already defined on the server.

    If the package does not appear in the pop-up menu, you can refresh the list of packages by clicking the Refresh button near the pop-up menu.

    Make sure you upload your CFCs to the testing server first. Only CFCs on the testing server are displayed.

  3. Select a component from the ones defined in the currently selected package.

    If the Component pop-up menu does not contain any components, or if none of your previously created components appear in the menu, you should upload the CFC files to the testing server.

  4. If you want to create a new component, click the Create New Component button.

    The New Component dialog box appears. For more information, seeSetting the New Component dialog box options.

  5. From the Function pop-up menu, select the function that contains the recordset definition.

    The Function pop-up menu contains only the functions defined in the currently selected component. If no function appears in this pop-up menu, or if your last changes are not reflected in the currently listed functions, check that your last changes were saved and uploaded to server.

  6. Edit each parameter (type, value, and default value) that must be passed as a function argument by clicking the Edit button.

    The Edit Parameter dialog box appears. For more information, see Setting the Edit Parameter dialog box options.

    You cannot modify the database connection and the SQL query for the recordset. These fields are always disabled--the connection and SQL query are displayed for your information.

  7. Click Test to connect to the database and create an instance of the recordset.

    If the SQL statement contains page parameters, ensure that the Default Value column of the Parameters box contains valid test values before clicking Test.

    If the query was executed successfully, a table displays the recordset. Each row contains a record and each column represents a field in that record.

    Click OK to clear the CFC Query.

  8. Click OK.

Related topics

  • Using a CFC recordset as a source of dynamic content

Getting Started with Dreamweaver
Dreamweaver Basics
Working with Dreamweaver Sites
Laying Out Pages
Adding Content to Pages
Working with Page Code
Preparing to Build Dynamic Sites
Making Pages Dynamic
Developing Applications Rapidly
Building ColdFusion Applications Rapidly
Building ASP.NET Applications Rapidly
Building ASP and JSP Applications Rapidly