Adding database content to the Web site—insert record
1. Plan the database (tables, linkages, fields)
2. Enter test data into the database
3. Note the location and path to this database on your testbed PC
4. In order to test the database-driven content, you need to download Personal Web Server (PWS)
a. Go to Microsoft’s site
5. Open Dreamweaver UltraDev 4
6. Create a test add data to a database form
a. Open the page in design view
b. Select Insert, then Live Objects, then Record Insertion Form
c. A dialog box will display
d. Specify the database table into which the record should be added
i. Select the connection (cnDBname, i.e. EZProgram)
ii. Select the table in the Insert into Table drop-down box
iii. In the “after inserting, go to” box enter the Web page to open after the record is added to the database. This page can be any page you specify. You may need to create a page if you do not have one already (i.e. EZProgram submission successful page)
iv. To create the test add data to a database form,
1. Specify the form objects you want to include on the form
2. Specify which columns in the database table each form object should update
3. UltraDev creates a form object for each column in the database table you select. You need to remove the unique key ID by using the minus (-) button. You can remove other objects in the same manner
4. You can change the order of the objects on the form by highlighting an object and then clicking the up or down arrow in the right-hand side of the dialog box
5. Specify how each data entry field should be displayed on the form by clicking a row in the Form Fields table and entering the following information:
a. In the Label box, enter a descriptive label to display beside the field. UltraDev uses the table column’s name by default
b. In the Display As pop-up menu, choose a form object to serve as the data entry field (text field, text area, Menu, Checkbox, etc.). For read-only entries, choose Text
c. In the Submit As pop-up menu, choose the data format expected by your database table, i.e. if the table column only accepts numbers, choose Numeric
d. Set the form object’s properties, which depends on whether you earlier chose Text or Menu, etc.
e. Click OK
v. UltraDev will add the form and an Insert Record server behavior
7. Test and preview
i. Make sure the Personal Web Server is running
ii. In UltraDev select View, then Preview live data
iii. You should see a new toolbar display near the top, and on the right-hand side a small gear icon should be running
iv. If all went well, you will see data displaying from the database
v. If unsuccessful, an error message will display. There is information on Macromedia’s site on error messages, as well as information on Microsoft’s site, depending upon the nature of the error. Apply the fixes (one by one) and then try again.
vi. Check to preview in the browser by clicking on View the Preview in browser, then select the browser.
vii. The browser will launch and display the page
viii. If an error message displays, you can check at Macromedia’s site or at Microsoft’s site, depending on the nature of the error message.
8. Once successful, move the database and the test add data to a database form to the Web server
9. Ask that an ODBC connection be made on the Web server to the database (cnDBname, i.e. EZProgram), if not already made—if the connection is needed provide the location and path to where the database is stored on the Web server
10. Once the ODBC connection has been made on the Web server at test can proceed
11. Edit the test add data to a database form and substitute the connection name and edit the data source name to point to the database on the Web server with the Web server ODBC connecter (rather than those on your testbed or design PC)
12. Test and preview on the Web server
a. Open the test page in UltraDev and add data
b. Select View, then Preview live data
c. You should see a new toolbar display near the top, and on the right-hand side a small gear icon should be running
d. If all went well, no error messages will display
e. If unsuccessful, an error message will display. There is information on Macromedia’s site on error messages, as well as information on Microsoft’s site, depending upon the nature of the error. Apply the fixes (one by one) and then try again.
13. Check to preview in the browser by clicking on View the Preview in browser, then select the browser.
14. The browser will launch and display the page
15. If an error message displays, you can check at Macromedia’s site or at Microsoft’s site, depending on the nature of the error message.
16. You can check to see if you were successful by either looking at the table in Access to see if the data has been entered, or by testing a display database access results form to see if any of the data you entered displays
17. Once successful, pilot the page with other staff in-house before asking for those “outside” to pilot, then once all is working unveil the new database-driven content
August 14, 2001
Denise A. Garofalo