产品模版:为什么不能实现删除功能?

来源:百度文库 编辑:神马品牌网 时间:2024/05/06 04:54:03
<!--#include file="../DBOpen.asp"-->
<%
if session("quanxian")="" then
response.write "错误!!您没有权限或者连接超时,请重新登陆." %>
<a href="../login.asp" target="_top"><b>登陆</b></a>
<% response.end
end if
dim isedit '是否在修改状态
dim color '表格颜色
dim sql,rs,rsc
dim border
dim number '每页显示的文章数目
dim curpage, i,page
border=""
color=1
function invert(str)
invert=replace(replace(replace(replace(str,"<","<"),">",">"),"<br>",chr(13))," "," ")
end function

number=6 '默认值
status=0
isedit=false

leibie= request("leibie")

if request("action")="edit" then
isedit=true
end if

if request("action")="del" then '*****************删除文章******************
set rs = server.createobject("adodb.recordset")
sql="delete from ninews where biaoti=" & cstr(request("bianhao"))
conn.execute sql
sql="delete from nipinglun where bianhao1=" & cstr(request("bianhao"))
conn.execute sql
%>
<script language=vbscript>
msgbox "操作成功!!该新闻及相关评论已删除!"
</script>
<% end if
%>
不行.提示错误是javascript有错.

先删除评论,再删除文章如何。