Related topics
•
"Building a record insert page (ASP and JSP)" on page 706
•
"Building pages to update a record (ASP and JSP)" on page 707
Identifying the record to delete (ASP and JSP)
When users want to delete a record, they must first find that record in the database. Accordingly,
you need a search and a results page to work with the delete page. For instructions on creating a
search and a results page, see
The results page tells the delete page which record to delete by passing it a URL parameter. The
next step is to retrieve the record to delete.
Retrieving the record to delete (ASP and JSP)
After the results page passes a URL parameter to the delete page identifying the record to delete,
the delete page must read the parameter, retrieve the record from the database table, and
temporarily store the record in a recordset.
To retrieve the record to delete:
In the Bindings panel (Window > Bindings), click the Plus (+) button and select Recordset.
1
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 delete is located using the
2
Connection and Table pop-up menus.
In the Columns area, select the All option to select all the columns in the database table.
3
Configure the Filter area so that the value of your key column equals the value of the
4
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.
5
When the user selects a record on the results page, the delete page generates a recordset containing
only the selected record.
The next step in building a page to delete records is to display the record to be deleted.
712
Chapter 42: Building ASP and JSP Applications Rapidly
"Building search/results pages (ASP and JSP)" on page
706.
,
id
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