This article describes how to delete a record from a
Microsoft Access 2000 database by using FrontPage 2000 and Active Server Pages
(ASP).
Delete a Record in a Microsoft Access Database Using ASP
To delete a record use the following steps:
- Start FrontPage 2000 and create a new web (on the File menu, click New and then click Web). In the Specify the location of the new web
box, type http://localhost/aspsample, and click the Web
site default of One Page Web.
- On a new page, point to Database on the Insert menu, and click Results.
- In step 1, click to select the Use a sample
database connection (Northwind) check box, and then click Next.
- In step 2, select Employees as the Record Source, and then click Next.
- In step 3, click Next.
- In step 4, select List - one field per
item in the Formatting list and Text fields in the List options list, and then click Next.
- In step 5, click Split records into
groups, and type 1 in the Records per group box. Click Finish.
- Double-click the Submit button, and change the Value/Label field to Delete.
- Right-click inside the form, and click Form Properties on the menu that appears.
- In the Form Properties dialog box, click Send to other, and then click Options.
- In the Action box, type Delete.asp. Click OK twice and then save the page as Delete_Form.asp.
- Create a new page. (On the File menu, point to New, click Page, and click Normal Page.)
- On the Insert menu, point to Database, and click Results.
- In step 1, click the Use an existing database
connection button, and then select Sample. Click Next.
- In step 2, click Custom query, and then click Edit. In the SQL statement window, type the following SQL code:
DELETE DISTINCT from Employees
WHERE FirstName='::FirstName::'
AND LastName='::LastName::'
Click OK and then click Next. - In step 3, click Next.
- In step 4, select Table - One Record Per
Row and then click Next.
- In step 5, make sure the Add search form check box is not selected. Click Finish and then save the page as Delete.asp.
NOTE: The field names FirstName and LastName represent the fields used
in the Aspsamp.mdb file. The fields ::FirstName:: and ::LastName:: represent
the one-line text box form fields.