Operation Manual
604
USING DREAMWEAVER
Building applications visually
Last updated 3/28/2012
7 In the Delete By Submitting pop-up menu, specify the HTML form with the Submit button that sends the delete
command to the server.
8 In the After Deleting, Go To box, specify a page to open after the record has been deleted from the database table.
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.
9 Click OK, and save your work.
Test your delete pages
1 Upload the search, results, and delete pages to your web server, open a browser and search for a disposable test
record to delete.
When you click a Delete link on the results page, the delete page should appear.
2 Click the Confirm button to delete the record from the database.
3 Verify that the record has been deleted by searching for the record again. The record should no longer appear in
the results page.
Building pages with advanced data manipulation
objects (ColdFusion, ASP)
About ASP command objects
An ASP command object is a server object that performs some operation on a database. The object can contain any
valid SQL statement, including one that returns a recordset, or one that inserts, updates, or deletes records in a
database. A command object can alter the structure of a database if the SQL statement adds or deletes a column in a
table. You can also use a command object to run a stored procedure in a database.
A command object can be reusable, in the sense that the application server can reuse a single compiled version of the
object to execute the command a number of times. You make a command reusable by setting the Prepared property
of the Command object to
true, as in the following VBScript statement:
mycommand.Prepared = true
If you know the command will be executed more than a few times, having a single compiled version of the object can
make database operations more efficient.
Note: Not all database providers support prepared commands. If your database does not support it, it might return an
error when you set this property to
true. It might even ignore the request to prepare the command and set the Prepared
property to
false.
A command object is created by scripts on an ASP page, but Dreamweaver lets you create command objects without
writing a line of ASP code.
Use ASP commands to modify a database
You can use Dreamweaver to create ASP command objects that insert, update, or delete records in a database. You
supply the command object with the SQL statement or stored procedure that performs the operation on the database.
1 In Dreamweaver, open the ASP page that will run the command.
2 Open the Server Behaviors panel (Window > Server Behaviors), click the Plus (+) button, and select Command.