Using JSP prepared statements to modify a database
You can use Dreamweaver to create JSP prepared statements that insert, update, or delete records in a database. A JSP prepared statement is a reusable server object that contains a SQL statement. You supply the prepared statement with the SQL that performs the operation on the database. For more information, see JSP prepared statements.
To create a prepared statement that edits a database record:
- In Dreamweaver, open the JSP page that will run the command.
- Open the Server Behaviors panel (Window > Server Behaviors), click the Plus (+) button and select Prepared (Insert, Update, Delete).
The Prepared (Insert, Update, Delete) dialog box appears.
- Complete the dialog box.
For instructions, click the Help button in the dialog box.
- Click OK.
After you close the dialog box, Dreamweaver inserts JSP code in your page that, when run on the server, creates a prepared statement that inserts, updates, or deletes records in the database.