beautypg.com

Adobe Dreamweaver CS3 User Manual

Page 559

background image

DREAMWEAVER CS3

User Guide

552

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.

You can also use a predefined SQL statement in a stored procedure by selecting the stored procedure from the
Database Items tree and clicking the Procedure button. Dreamweaver automatically fills in the SQL and Variable
areas.

4

If the SQL statement contains variables, define their values in the Variables area by clicking the Plus (+) button

and entering the variable’s name, default value (the value the variable should take if no run-time value is returned),
and run-time value.

If the SQL statement contains variables, make sure the Default Value column of the Variables box contains valid test
values.

The run-time value is usually a URL or form parameter entered by a user in an HTML form field.

URL parameters in the Run-time Value column.

Form parameters in the Run-time Value column:

5

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

If the SQL statement contains variables, make sure the Default Value column of the Variables box contains valid test
values before clicking Test.

If successful, a table appears displaying the data in your recordset. Each row contains a record and each column
represents a field in that record. Click OK to clear the recordset.

6

If satisfied with your work, click OK.

Options for the advanced Recordset dialog box (ColdFusion)

Use the advanced Recordset dialog box to write custom SQL queries, or use the Database Items tree to author SQL
queries using a point-and-click interface.

Note: If you are creating advanced recordsets for use with ColdFusion 5 or earlier, use the generic advanced Recordset
dialog box common to other document types such as ASP and JSP.

1

In the Name 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

Server Model

Run-Time value expression for URL parameter

ASP

Request.QueryString(“formFieldName”)

JSP

request.getParameter("formFieldName

")

PHP

#

formFieldName

#

Server Model

Run-Time value expression for form parameter

ASP

Request.Form(“formFieldName”)

JSP

request.getParameter("

formFieldName

")

PHP

#

formFieldName

#

September 4, 2007