beautypg.com

Adobe Dreamweaver CS3 User Manual

Page 647

background image

DREAMWEAVER CS3

User Guide

640

Add a server behavior to update the database table

1

In the Server Behaviors panel (Window > Server Behaviors), click the Plus (+) button and select Update Record

from the pop-up menu.

The Update Record dialog box appears.

2

Select a form from the Submit Values From pop-up menu.

3

In the Data Source or Connection pop-up menu, select a connection to the database.

4

Enter your user name and password if applicable.

5

In the Update Table pop-up menu, select the database table that contains the record you are updating.

6

(ColdFusion, PHP, ASP.NET) Specify a database column to update, select the form object that will update the

column from the Value pop-up menu, select a data type for the form object from the Submit As pop-up menu, and
select Primary Key if you want to identify this column as the primary key.

The data type is the kind of data the column in your database table is expecting (text, numeric, Boolean option
values).

Repeat the procedure for each form object in your form.

7

(ASP, JSP) In the Select Record From pop-up menu, specify the recordset that contains the record displayed in the

HTML form. 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. Select the Numeric option if the value is a number. A key column usually
accepts only numeric values, but sometimes accepts text values.

8

In the After Updating or On Success, Go To box, enter the page to open after the record updates in the table or

click the Browse button to browse to the file.

9

(ASP.NET) In the On Failure, Go To box, enter the location of a page to display if the server behavior fails or click

the Browse button to browse to the location.

10

(ASP.NET) Select the Display Debugging Information On Failure option if you want debugging information

when the server behavior fails. When you select this option, Dreamweaver ignores the On Failure, Go To Option.

Use the debugging option during development and use the OnFailure, GoTo option when your site is live.

11

(ASP, JSP) Specify a database column to update, select the form object that will update the column from the

Value pop-up menu, and then select a data type for the form object from the Submit As pop-up menu. The data type
is the kind of data the column in your database table is expecting (text, numeric, Boolean option values). Repeat the
procedure for each form in your form.

12

Click OK.

Dreamweaver adds a server behavior to the page that lets users update records in a database table by modifying the
information displayed in the HTML form and clicking the Submit button.

To edit the server behavior, open the Server Behaviors panel (Window > Server Behaviors) and double-click the
Update Record behavior.

Complete the update page in one operation

An update page has three building blocks:

A filtered recordset to retrieve the record from a database table

An HTML form to let users modify the record’s data

September 4, 2007