Dynamic Web Tutorials and Notes

Delete records

  1. File>New
  2. Select Dynamic Page
  3. Click ASP VB Script
  4. Click ‘Create’
  5. Create a DSNto your database if necessary (see IV)
  6. Create a Recordset (see V) – rsDeleteRecords
  7. Click ‘Insert > Form’
  8. Click inside form
  9. Click ‘Bindings’ tab
  10. Click LastName
  11. Click ‘Insert’
  12. Put semi colon after
  13. Click FirstName
  14. Click ‘Insert’
  15. Click mouse to deselect
  16. Click ‘Insert>Form Objects>Button’
  17. Select button and rename it ‘Delete record’ in label box in properties window (Window>Properties)
  18. Your page should now look like this:
  19. Click ‘Server Behaviours’ tab
  20. Click ‘+’
  21. Click ‘Delete record’
  22. Select connection you defined in IV
  23. Delete from ‘Employees’
  24. Select record from rsDeleteRecords
  25. Unique key column is EmployeeID
  26. Delete by submitting Form1
  27. After Deleting go to ‘success.htm’ – will make this later
  28. Click ‘OK’
  29. Insert text on page – Warning!! This action cannot be undone
  30. Insert Recordset Navigation Bar as in XIV
  31. Save page as ‘Delete.asp’
  32. Press F12 to view the page in the browser window:
Valid CSS! . Valid XHTML 1.0 Strict . Level Triple-A conformance icon, 
          W3C-WAI Web Content Accessibility Guidelines 1.0 .