Week 3 Project

For this week, I will create a simple interface that adds, displays, changes, and deletes a record. I should already have code in place from week 2 to connect to my database.  Now I will learn to actually manipulate it.  Using the code from Week 2, I will make sure I can connect to the table I created. Then, I will:
  1. Write an ASP command that will add a new record to the table.  For now, I have hard coded the information for each field (by the end of the course, we learn how to do this using input from an HTML form).
  2. Write an ASP command that will display [the very first record, all records and] the last record I've just added.  This will involved creating an SQL statement that selects this record.  I should [and I do] have a field (the Primary Key) that uniquely identifies each record, so I should be able to write an SQL statement that retrieves the record I added in Step 1.
  3. Write an ASP command that changes the data in just this record.  I will use SQL to select the record, then hard code some changes and commit them.
  4. Re-display the record to verify the changes were made. (See Step 2.)
  5. Now write an ASP command that deletes the record.  Again, this means selecting the appropriate record using SQL, then removing it using ADO.

For each snippet above, I will create a separate small .asp command file that performs the desired action (note there would be 4 files because steps 2 and 4 use the same file).  Then tie it all together with a simple HTML page that has 5 hyperlinks that process the steps above by manually clicking on the hyperlinks. This is the file I should give my teacher, Robert, access to when I am done. He should be able to click on each link and perform the desired operation.

Copyright © 2006 Jonathan Lewis Slate. All rights reserved.
Contact WebMaster