![]() |
|
Adding database content to the Web site—display search results
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
b. Download
c. Install
5. Open Dreamweaver UltraDev 4
6. Create a test display database access results form
a. Create a table to display the data (can be 2 rows by 2 columns)
b. Insert the table
c. Supply the table headings
d. Associate the data display row with the data source
i. Highlight the data display row (not the table’s data headings)
ii. Click on Data Bindings
iii. Click on +
iv. Choose Recordset Query
v. Need to create a database connection—click Define
vi. Name the connection (cnDBname, i.e. cnEZProgram)
vii. Then define the data connection—an ODBC connection with MS Access drivers (cnDBname, i.e. cnEZProgram)
viii. Supply a Data Source Name (dsnDBname, i.e. dsnEZProgram)
ix. If successful the tables in the database will display
x. If they do not display, go back and troubleshoot
xi. If they do display, Select the elements or choose Select all. Note that you can choose to have display results sorted—make sorting choices at the bottom of the Recordset window
e. Now you need to associate elements in the Recordset with the fields on the results form
i. Highlight the first data display row cell in the display database access results form
ii. Click on the “+” sign in the Recordset to display all of the elements
iii. Click on the element in the Recordset that relates to the cell you have highlighted, then click Insert
iv. Repeat until all elements in the display database access results form table are associated with the Recordset
f. By default only one record will be pulled out of the database and displayed, even if more records exist
g. To have all records display,
i. Highlight the data elements (not the data headers) in the table in the display database access results form
ii. Select Server Behaviors
iii. Click on the “+” sign
iv. Select the Repeat Region option from the drop-down menu
v. Then select Show All
h. To 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.
7. Once successful, move the database and the test display database access results form to the Web server
8. 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
9. Once the ODBC connection has been made on the Web server at test can proceed
10. Edit the test display database access results 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)
11. Test and preview on the Web server
a. Open the file on the remote server in UltraDev
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, you will see data displaying from the database
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.
12. 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