<html>
<head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>删除记录</title> </head>
<body> <%dim wuzi wuzi=request("goodname") dim objconn set objconn=server.createobject("adodb.connection") objconn.connectionstring="driver={microsoft access driver (*.mdb)};"&"dbq="&server.mappath("firm.mdb") objconn.open dim objrs,strsql strsql="delete from 物资表 where 物资名称='"&wuzi&"'" set objrs=server.createobject("adodb.recordset") objrs.open strsql,objconn,1,3 set objrs=nothing %>
<script language ="vbscript"> msgbox "删除成功" </script> <%
set objrs=server.createobject("adodb.recordset") objrs.open session("sql"),objconn,1,3 %> <div align="center"> <table border="2" bordercolorlight="#5C9ECF" bordercolordark="#5C9ECF"> <tr> <% for i=0 to objrs.fields.count -1 response.write "<th>"&objrs.fields(i).name&"</th>" next %> <th>操作类型选择</th><th>操作类型选择</th></tr> <% Do while Not objrs.eof data="<tr>" for i=0 to objrs.fields.count -1 data=data&"<td>"&objrs.fields(i).value&"</td>" next response.write data&"<td><a href=delrecord.asp?goodname=objrs.fields(1).value>删除此项记录</td><td><a href=xiugaijilu.asp?goodname>修改此项记录</td></tr>" objrs.movenext Loop objrs.close set objrs=nothing objconn.close set objconn=nothing %> </body>
</html>
显示删除成功,无错误提示,就是没实际删除掉数据库记录
[此贴子已经被作者于2004-11-24 22:32:20编辑过]