Microsoft KB Archive/240200

= How to delete a record from an Access database by using ASP in FrontPage 2000 =

Article ID: 240200

Article Last Modified on 9/28/2004

-

APPLIES TO


 * Microsoft FrontPage 2000 Standard Edition

-



This article was previously published under Q240200



IN THIS TASK

 * SUMMARY
 * Delete a Record in a Microsoft Access Database Using ASP
 * REFERENCES



SUMMARY
This article describes how to delete a record from a Microsoft Access 2000 database by using FrontPage 2000 and Active Server Pages (ASP).

back to the top

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.</li> Double-click the Submit button, and change the Value/Label field to Delete.</li> Right-click inside the form, and click Form Properties on the menu that appears.</li> In the Form Properties dialog box, click Send to other, and then click Options.</li> In the Action box, type Delete.asp. Click OK twice and then save the page as Delete_Form.asp.</li> Create a new page. (On the File menu, point to New, click Page, and click Normal Page.)</li> On the Insert menu, point to Database, and click Results.</li> In step 1, click the Use an existing database connection button, and then select Sample. Click Next.</li>  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. </li> In step 3, click Next.</li> In step 4, select Table - One Record Per Row and then click Next.</li> In step 5, make sure the Add search form check box is not selected. Click Finish and then save the page as Delete.asp.</li></ol>

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.

back to the top

<div class="references_section">