Building Forms to Insert Data into a Database
Return to Using the FrontPage Database Wizards
The following directions will show you how to build a form and to have FrontPage save what is put into the form into a database. |
1. Build a form and right click on it to get to Form Properties. |
Select the Insert menu and choosing Form. You need to know what kind of form fields you want and you need to name the form fields according to the type of information you want put in them. In form properties click on the "Send to database" selection. |
2. Click on the "Options..." button. |
If you already have a database and a connection to that database you will find the database connection listed and the tables in that database listed. You need to select the appropriate database and table. If you don't have a database in your web already you can have FrontPage create one by clicking on the "Create Database..." button. A database will be created using the form field names in your form as database fields and a connection to that database will be established. If you have a database in your web but have not established a connection to it you can click on the "Add Connection..." button (see Creating a Database Connection). |
3. If you are inserting data into an existing form,*
click on the "Saved Fields" tab.
*If you had FrontPage create a database for you then you are done. Your form will automatically insert data into the database you just created. |
You need make sure the input from your form fields gets into the correct database fields. You will see a list of the form fields that are in your form. Highlight a form field. |
4. Click on the "Modify..." button. |
The form field you highlighted will be named in the "Form field:" box. Below that will be a "Save to database column:" dropdown menu. All the data fields available in the database table you are working with will be listed in this menu. Click on the database field you want the information entered in the web page form field to go to. |
When you are done, all of your form fields will have a database column associated with it. In this example we made the form field names the same as the database fields but they can have different names. It is easier, though, if you keep the names consistent. |