ASP Database Deletes

[Total: 0    Average: 0/5]

Deleting a Record

Deleting a record in your database is very similar to updating, so we’re going to use the same code for the first page called users.asp. The only thing that will need changed in the users.asp page is the link for each user. This time, we need to point it to the page that will delete the record. So change the link in your users.asp page from:

And then save this as duser.asp. All we need now is one more page to do the actual deleting, so that’s all this tutorial will contain. If you don’t know how to create the duser.asp page that we mentioned, check out our previous tutorial on updating a record in a database. Here we go.

After passing the ID of the record we want to delete, we use our DELETE statement.

Not too hard, eh? Have fun, just don’t go crazy with it or you won’t have a database to work with after too long. Remember to post any questions on our messageboard. See ya next time!

~Geoff Swartz

Times Viewed: 20

Leave a Reply

Your email address will not be published. Required fields are marked *