Building & Managing Web Sites with Microsoft Technologies
Lab 11 - Accessing database with FrontPage 98 and ASP

 
    Home   Lectures   Labs   Resources   Discussion   Search  
In this lab, you will build a dynamic web page that outputs formatted data from a database. First you will use FrontPage 98 to make a fairly simple form, then you will repeat the process using ASP code.

1. Project Folder
Open your child web on the class webserver and create a directory called "Lab11".

2. Create a FrontPage ASP Page
Create a new page called "FPData.asp" and creatively format the beginning and end of the page so the page is a "New Publications" page for the MegaCorp Library (see Lab 6).  Then use the FrontPage Database Region Wizard to connect to the "Pubs" DSN on our class webserver. You will use the following information to complete the wizard.

Username: student
Password: student
SQL String: SELECT * FROM TitleView ORDER BY Title
Field Names: title, pub_id

Review your work.

3. Re-create this page using ASP and ADO.
Create a new page called ASPData.asp and repeat the creative formatting from before.   Then switch to the HTML view and enter the appropriate ASP code as described in the last lecture.  Use the "Firehose" cursor sample code with the following connection string:

"Driver=SQL Server;Server=Deathstar;Database=Pubs;UID=student;pwd=student"

Use the following code to build your table:

While not rs.EOF
     Response.Write("<tr>")

     Response.Write("<td>")
     Response.Write rs("title")
     Response.Write("</td>")

     Response.Write("<td>")
     Response.Write rs("pub_id")
     Response.Write("</td>")

     Response.Write("</tr>")
     rs.Movenext
Wend

Review your work. ASK FOR HELP if you are stuck.

This lab will not be graded. However, you should definitely complete it to understand the next lecture and complete your group project.

[csc96b/_private/footer.htm]