Adobe 38040334 - Dreamweaver CS3 User Manual page 560

Pc
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

Recordset names can only contain letters, numbers, and the underscore character (_). You cannot use special
characters or spaces.
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.
Note: The Function pop-up menu is only available if a CFC file is the current document and you have access to a
computer running ColdFusion MX 7 or better.
The recordset is defined in the function.
Select a data source from the Data Source pop-up menu.
2
If no data source appears in the pop-up menu list, you will need to first create a ColdFusion data source.
In the Username and Password boxes, enter the user name and password for the ColdFusion application server if
3
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.
Enter a SQL statement in the SQL text area or use the graphical Database Items tree at the bottom of the dialog
4
box to build a SQL statement from the chosen recordset.
(Optional) Do the following to use the Database Items tree to build the SQL statement:
5
Ensure the SQL text area is blank.
Expand the branches of the tree until you find the database object you need—for example, a column in a table.
Select the database object and click one of the buttons on the right side of the tree.
For example, if you select a table column, the available buttons are Select, Where, and Order By. Click one of the
buttons to add the associated clause to your SQL statement.
If your SQL statement contains parameters, define their values in the Parameters area by clicking the Plus (+) button
and entering the parameter's name and default value (the value the parameter should take if no run-time value is
returned).
If the SQL statement contains parameters, make sure the Default Value column of the Parameters box contains valid
test values.
The Page Parameters allow you to provide default values for run-time value references in the SQL you write. For
example, the following SQL statement selects an employee record based on the value of the employee's ID. You can
assign a default value to this parameter, ensuring that a run-time value is always returned. In this example,
refers to a form field in which the user enters an employee ID:
FormFieldName
SELECT * FROM Employees WHERE EmpID = + (Request.Form(#FormFieldName#))
The Add Page Parameters dialog box would contain a name-value pairing similar to:
Name
FormFieldName
The run-time value is usually a URL or form parameter entered by a user in an HTML form field.
Click Test to connect to the database and create an instance of the recordset.
6
Default values
0001
September 4, 2007
DREAMWEAVER CS3
553
User Guide

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents