现在的问题是应该删除的和实际删除的不一样,我把原来执行的那个网页代码贴出来啊 <%@language=VBScript%> <% dim belong1 belong1=CStr(server.htmlencode(request("belong1")))
Set Conn=Server.CreateObject("ADODB.Connection") conn.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & server.mappath("装备分布.mdb") CommandText="select * from 装备分布 where 所属市局='"&belong1&"'" Set RS=Conn.Execute(CommandText) %>
<html>
<head> <meta name="GENERATOR" content="Microsoft FrontPage 6.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>新建网页 1</title> </head>
<body> <p align="center" style="margin-bottom: 0"><span style="letter-spacing: 2px"><b> 装备分布情况</b></span></p> <table border=0 cellspacing="1" bgcolor="#000080" width="99%"> <% Response.write "<tr>" For I=0 To RS.Fields.Count-1 %>
<td bgcolor="#FFF7E6"><font style="font-size: 9pt"><%=RS(I).Name%></font></td>
<% Next Response.write "<td bgcolor="&"#FFF7E6"&">"&" "&"</td>"&"<td bgcolor="&"#FFF7E6"&">"&" "&"</td>"&"</tr>"
While Not RS.EOF Response.write "<tr>" For I=0 To RS.Fields.Count-1 %> <td bgcolor="#FFFFFF"><font style="font-size: 9pt"><%=RS(I).Value%></font></td> <%
Next %> <td bgcolor="#FFFFFF" width="29"> <p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> <a style="font-size:9pt;color:#293876;text-decoration:none" href="modify.asp?key=<%=RS("编号")%>">修改</a><span style="font-size: 9pt"> </span> </td> <td bgcolor="#FFFFFF" width="36"> <p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> <a style="font-size:9pt;color:#293876;text-decoration:none" href="delete.asp?key=<%=RS("编号")%>">删除</a><span style="font-size: 9pt"> </span> </td>
<% RS.MoveNext Response.write "</tr>" Wend
RS.Close Conn.Close %> </table> <p align=center> <a style="font-size:9pt;color:#293876" href=add.asp>点击此处添加新纪录</a><span style="font-size: 9pt"> </span> </p> <p align=center> <input type="button" name="Button" value="返回" onclick="history.back();"> </p>
</body>
</html>