|
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. |
|
|
|
|
|
|
|
|
|
For example, if a column in a Microsoft Access table is set to receive Yes/No values, choose "Checkbox 1,0" or "Checkbox MS Access" from the Submit As pop-up menu. |
|
Note: "Checkbox Y, N" will not work in Microsoft Access, even if the data type is set to Yes/No. |
|
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.
|
|
|
|