connection.asp
<%
<HTML>
<HEAD>

</HEAD><BODY><!-- 请在这里输入您的HTML代码 --><%
dim connstr
connstr ="provider=microsoft.jet.oledb.4.0;data source="&server.mappath("db1.mdb")
dim conn
set conn=Server.CreateObject("adodb.connection")
conn.Open connstr%>

</BODY></HTML><%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>删除记录</title>
</head>
<!--#include file="connection.asp"--><%
strBookID = request.QueryString("BookID")'response.Write(strBookID)  可以得到strBookID的值Set rs = Server.CreateObject("ADODB.Recordset")
strSQL = "delete  from books"
strSQL = strSQL&"where BookID="&Trim(strBookID)
rs.open strSQL ,conn, 1,3
rs.delete
rs.update
rs.close
conn.close
response.Redirect("index.asp")%>
<body>
</body>
</html>