This is what I have to do:
Download and install the PUBS database onto your computer. File for install script is instpubs.sql in course content.
Design a Web page(s) that accesses the PUBS database on your computer and does the following processing. The Course Documents section contains a zip file that contains a collection of sample programs to be used for this assignment. When you click on the link for this file, you need to choose the "Save" option and then save the file on your computer. After saving it, you may unzip it to get the files.
Accept the name of an author and determine if that author is in the database. If it is in the database, display the title ID, title, price, and publication date of all books written by that author on a separate screen. Display an error message otherwise. Also include a link that, when clicked, returns the user to the first screen.
Zip your files together and upload them in the Digital Drop Box.
This is what I have:
<!-- HTML Code To Generate A Form and Accept an Author's Name -->
<!-- PASS 8 -->
<!-- Author Seach in Database -->
<table border="1" align="center" cellspacing=3 cellpadding=5>
' ASP Code Starts Here
' Connect to the database
' Retrieve author's name
searchmyauthor = request("writer")
' Execute SQL Query To Get Author's info Obtaining a Result Set Called rp
set rp = conn.Execute("Select au_id from authors where au_fname = '" & au_lname = '" &_
searchmyauthor & "'")
' Check to see if result set is empty
if not rp.eof then
myname = rp("au_id")
myname = "Unknown"
' Find info for author seleced
set rc = conn.Execute("SELECT title_id,title,price,pubdate FROM TITLES WHERE authors.au_id=titleauthor.au_id & titleauthor.title_id= titles.title_id'" &_
searchmyauthor & "'" )
' Prepared at their own house
if not rc.eof then
response.write( "<tr><td colspan=4><center> <font size=+2>Books Published By " &_
myname & "</font></center></td></tr>" )
' In this part, ASP sends all HTML code to browser as strings
do while not rc.eof
response.write( "<tr><td colspan=2><center> <font size=+2>No Author foung with name provided " & searchmyauthor & "</font></center></td></tr>" )
' Close connection and free memory