This dialog box defines a recordset as a source of dynamic content by writing a custom SQL statement, or by creating a SQL statement using the graphical Database Items tree.
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
Note that recordset names can only contain letters, numbers, and the underscore character (_). You cannot use special characters or spaces.
For more information writing SQL statements, see SQL Primer, and Creating SQL queries using the Database Items tree.
If you want to use the Database Items tree to build the SQL statement:
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.
If the SQL statement contains variables, make sure the Default Value column of the Variables box contains valid test values.
The runtime value is usually a URL or form parameter entered by a user in an HTML form field. For more information on URL and form parameters, see Obtaining Data for Your Page.
URL parameters in the Runtime Value column.
Server Model |
Runtime value expression for URL parameter |
---|---|
ASP |
Request.QueryString("formFieldName") |
JSP |
|
PHP |
|
Form parameters in the Runtime Value column:
Server Model |
Runtime value expression for form parameter |
---|---|
ASP |
Request.Form("formFieldName") |
JSP |
|
PHP |
|
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.