注册 登录
编程论坛 ASP技术论坛

删除记录集的问题,什么原因导致无效果?

恋上早餐 发布于 2007-12-02 23:45, 1060 次点击
高手赐教:

<!--#include file="conn.asp"-->
<%
no=request.querystring("no")
delnews="delete * from news where no="&no
conn.execute(delnews)
response.Redirect "editnews.asp"
%>
<%
rs.close
conn.close
set rs=nothing
set conn=nothing
%>

按理来说这段删除代码是没有错的啊~~可是在显示页面调用删除页面的时候,没把记录给删了,但是最后response.Redirect还是执行了·?
数据库的问题吗?还是conn.execute有问题~~??
6 回复
#2
中国男孩2007-12-02 23:49
回复 1# 的帖子
是因为response.redirect这条语句传过去的时候,没有刷新,
刷一新,不就可以了吗?
#3
heavenlc2007-12-03 00:04
delnews="delete * from news where no="&no
改成
delnews="delete from news where no="&no

改成这样试试
#4
不惑2007-12-03 10:15
no的值有没有正确传过来?
在conn.asp中有无:
on error resume next
如有先去了它。
#5
恋上早餐2007-12-03 22:35
回复 2# 的帖子
已经刷新了,而且还特地打开数据库看呢?没删除成功。。。
#6
yms1232007-12-03 22:42
数据库是Access的话检查一下是否只读,SQL Server是否拥有删除权限?
#7
恋上早餐2007-12-03 22:49
三楼的试过也不行
四楼的没有那个情况呀。。
先谢谢你们拉。。自己再研究研究。。唉
1