Macromedia dreamweaver 8-using dreamweaver User Manual

Page of 1030
824
Chapter 40:  Building ColdFusion Applications Rapidly
The second page you need is the results page, which performs most of the work. The result’s 
page does the following tasks:
Reads the search parameters submitted by the search page
Connects to the database and search for records
Builds a recordset with the records found
Displays the contents of the recordset
Optionally, you can add a detail page. A detail page gives users more information about a 
particular record on the results page.
If you use ASP.NET, you can combine both the search page and the results page into one 
page.
If you have only one search parameter, Dreamweaver lets you add search capabilities to your 
web application without using SQL queries and variables. Simply design your pages and 
complete a few dialog boxes. If you have more than one search parameter, you need to write a 
SQL statement and define multiple variables for it.
Dreamweaver inserts the SQL query in your page. When the page runs on the server, each 
record in the database table is checked. If the specified field in a record meets your SQL query 
conditions, the record is included in a recordset. The SQL query in effect builds a recordset 
containing only the search results.
For example, field sales staff might have information about customers in a certain area have 
incomes above a certain level. In a form on a search page, the sales associate enters a 
geographical area and a minimum income level, and then clicks the Submit button to send 
the two values to a server. On the server, the values are passed to the results page’s SQL 
statement, which then creates a recordset containing only customers in the specified area with 
incomes above the specified level.
Related topics
About advanced database manipulation objects
Though you can use server behaviors to build pages that modify databases, you can also use 
database manipulation objects such as stored procedures, ASP command objects, or JSP 
prepared statements to build the pages.