Home > Products > UltraDev > Support > Editing Database Records
Dreamweaver UltraDev Icon Macromedia Dreamweaver UltraDev Support Center - Editing Database Records
Adding the Insert Record server behavior

The last step is mapping your form objects to their corresponding columns in the database table. You do this by adding the Insert Record server behavior.

To add the Insert Record server behavior:

1 In the Server Behaviors panel (Window > Server Behaviors), click the plus (+) button and choose Insert Record from the pop-up menu.
The Insert Record dialog box appears.
2 Use the Connection and Insert Into Table pop-up menus to specify the database table into which the record should be inserted.
3 In the After Inserting, Go To text box, enter the page to open after the record is inserted into the table. For the book club example, this will be a page thanking the user for completing the survey.
4 In the Get Values From pop-up menu, choose the HTML form used to enter the data.
5 Specify what each object on your form will update in the database table by selecting a form object from the Form Elements list, then choosing a corresponding table column from the Column pop-up menu and a data type from the Submit As pop-up menu.
The data type is the kind of data the column in your database table is expecting. For example, if the column in the table is set to receive text values, choose Text from the Submit As pop-up menu.
Repeat this step for each form element on the page.
6 Click OK.
The form on your survey page is now ready to add records to your database.

To Table of Contents Back to Previous document