DREAMWEAVER CS3
User Guide
650
You can specify a page that contains a brief success message to the user, or a page listing the remaining records so
that the user can verify that the record has been deleted.
10
(ASP.NET)(Optional) Select the Display Debugging Information On Failure option. The debugging information
is generated by the server. To provide a custom error message, deselect the Display Debugging Information On
Failure option and specify a page to open in the On Failure, Go To box.
11
Click OK, and save your work.
Upload the pages to your web server, open a browser and search for a record to delete. When you click a Delete link
on the results page, the delete page appears. Click the Confirm button to delete the record from the database. To
verify that the record has been deleted, open the page with the Delete links again. The record should no longer appear
in the list.
Note:
Click Refresh if the record still appears on the page.
Add logic to delete the record (ASP, JSP)
After adding a button the user can click to delete the record, the final step is to add the Delete Record server behavior
to update the database table after the user clicks the Submit button.
1
In the Server Behaviors panel (Window > Server Behaviors), click the Plus (+) button and select Delete Record
from the pop-up menu.
2
In the Connection pop-up menu, select a connection to the database.
Click the Define button if you need to define a connection.
3
In the Delete from Table pop-up menu, select the database table that contains the record to delete.
4
In the Select Record From pop-up menu, specify the recordset that contains the record to delete.
5
In the Unique Key Column pop-up menu, select a key column (usually the record ID column) to identify the
record in the database table.
If the value is a number, select the Numeric option. A key column usually accepts only numeric values, but
sometimes it accepts text values
6
In the Delete By Submitting pop-up menu, specify the HTML form with the Submit button that sends the delete
command to the server.
7
In the After Deleting, Go To box, enter the page to open after the record is deleted from the database table or click
the Browse button to browse to the file.
September 4, 2007