为什么我点删除链接却删除不了?
admin.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%option explicit%>
<!--#include file="connection.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>管理</title>
</head>
<body>
<%
on error resume next
if request.QueryString("act")="del" then
id=request.QueryString("id")
db.begintrans
'db.execute"delete from news where n_id="&CInt(id)删除方式与下面的相同!
rs.open"select * from news where n_id="&CInt(id),db,1,3
rs.delete
rs.close
if err.number<>0 then
db.rollbacktrans
response.write("删除失败")
else
db.committrans 是不是因为这个地方?
response.write("删除成功")
end if
end if
%>
<table width="754" height="22" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="47"><div align="center">编号</div></td>
<td width="261"><div align="center">标 题</div></td>
<td width="77"><div align="center">作 者</div></td>
<td width="119"><div align="center">时 间</div></td>
<td width="87"><div align="center">信息类别</div></td>
<td width="163"><div align="center">操作</div></td>
</tr>
<%
dim rs,sql
sql="select n_id,n_title,n_name,n_date,n_cate from news order by n_date desc"
Set rs=db.Execute(sql)
do while not rs.eof
%>
<tr>
<td align="center"><%=rs("n_id")%></td>
<td align="center"><%=rs("n_title")%></td>
<td align="center"><%=rs("n_name")%></td>
<td align="center"><%=rs("n_date")%></td>
<td align="center"><%=rs("n_cate")%></td>
<td align="center"><a href="admin.asp?act=del&id=<%=rs("n_id")%>">删除</a> <a href="modify.asp?n_id=<%=rs("n_id")%>">修改</a></td>
</tr>
<%
rs.movenext
loop
%>
</table>
<p> </p>
</body>
</html>