beautypg.com

Search for the record to update, Retrieve the record to update, Create links to the update page – Adobe Dreamweaver CC 2015 User Manual

Page 658: Complete the update page block by block

background image

651

Building applications visually

Last updated 6/3/2015

Search for the record to update

When users want to update a record, they must first find that record in the database. Accordingly, you need a search
and a results page to work with the update page. The user enters search criteria in the search page and selects the record
on the results page. When the user clicks the record on the results page, the update page opens and displays the record
in an HTML form.

Create links to the update page

After creating the search and results pages, you create links on the results page to open the update page. You then
modify the links to pass the IDS of the records the user selects. The update page uses this ID to find the requested record
in the database and display it.

You use the same process to open the update page and pass a record ID that you do to open a detail page and pass a
record ID. For more information, see .

Retrieve the record to update

After the results page passes a record ID to the update page identifying the record to update, the update page must read
the parameter, retrieve the record from the database table, and store it temporarily in a recordset.

1

Create a page in Dreamweaver and save it.

The page will become your update page.

2

In the Bindings panel (Window > Bindings), click the Plus (+) button and select Recordset.

If the advanced dialog box appears, click Simple. The advanced dialog box has a text area to enter SQL statements;
the simple one does not.

3

Name the recordset and specify where the data you want to update is located using the Connection and Table
pop-up menus.

4

Click Selected, and select a key column (usually the record ID column) and the columns that contain the data to be
updated.

5

Configure the Filter area so that the value of your key column equals the value of the corresponding URL parameter
passed by the results page.

This kind of filter creates a recordset that contains only the record specified by the results page. For example, if your
key column contains record ID information and is called PRID, and if the results page passes the corresponding
record ID information in the URL parameter called id, the Filter area should look like the following example:

6

Click OK.

When the user selects a record on the results page, the update page generates a recordset containing only the selected
record.

Complete the update page block by block

An update page has three building blocks:

• A filtered recordset to retrieve the record from a database table

• An HTML form to let users modify the record’s data