Retrieving the record to update (ColdFusion)
After the results page passes a URL parameter 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.
To retrieve the record to update:
Create a new ColdFusion page in Dreamweaver and save it.
1
The page will become your update page.
In the Bindings panel (Window > Bindings), click the Plus (+) button and select Recordset.
2
If the advanced dialog box appears, click the Simple button to open the simple dialog box.
Name the recordset and specify where the data you want to update is located using the
3
Connection and Table pop-up menus.
Click the Selected option and select a key column (usually the record ID column) and the
4
columns containing the data to be updated.
Configure the Filter area so that the value of your key column equals the value of the
5
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
then here's how your Filter area should look:
Click OK.
6
When the user selects a record on the results page, the update page will generate a recordset
containing only the selected record.
Completing the update page in one operation (ColdFusion)
An update page has three building blocks:
•
A filtered recordset to retrieve the record from a database table (see
update (ColdFusion)" on page
•
An HTML form to let users modify the record's data
•
An Update Record server behavior to update the database table
You can add the final two building blocks of an update page in a single operation using the
Record Update Form application object. The application object adds both an HTML form and
an Update Record server behavior to the page.
Before you can use the application object, your web application must be able to identify the
record to update, and your update page must be able to retrieve it. See
to update (ColdFusion)" on page
on page
650,
"Creating a URL parameter for update links (ColdFusion)" on page 651
"Retrieving the record to update (ColdFusion)" on page
652
Chapter 40: Building ColdFusion Applications Rapidly
652)
649,
"Creating the links to open the update page (ColdFusion)"
"Retrieving the record to
"Searching for the record
652.
,
id
and
Need help?
Do you have a question about the DREAMWEAVER MX 2004-USING DREAMWEAVER and is the answer not in the manual?
Questions and answers