<%@ Language=VBScript %> <% Option Explicit %> <% 'We want to delete our products. The list of ProductIDs that need 'to be deleted are in a comma-delimited list... Dim strDeleteList strDeleteList = Request("Delete") if strDeleteList = "" then 'No items to delete Response.Write "You did not select any items to delete!" Else 'Open a connection to the database Dim objConn Set objConn = Server.CreateObject("ADODB.Connection") objConn.ConnectionString = "DSN=Products" objConn.Open 'Now, use the SQL set notation to delete all of the records 'specified by strDeleteList Dim strSQL strSQL = "DELETE FROM Products " & _ "WHERE ProductID IN (" & strDeleteList & ")" objConn.Execute strSQL 'Clean up objConn.Close Set objConn = Nothing 'Display to the user that the product have been deleted. Response.Write Request("Delete").Count & " products were deleted..." End If %>