我该如何删除数据?

No1bigtooth 2009-09-27 01:35:46
sss=LCase(request.servervariables("QUERY_STRING"))
if instr(sss,"select")<>0 or instr(sss,"inster")<>0 or instr(sss,"delete")<>0 or instr(sss,"(")<>0 or instr(sss,"'or")<>0 then
response.write "<BR><BR><center>你的网址不合法"
response.end
end if
在数据库连接文件里面有上面一段代码引入数据库连接文件后
总是提示:你的网址不合法
<%
if Request("action")="delete" then
dataid=Cstr(Request.QueryString("id"))

set rs=server.CreateObject("adodb.recordset")
sql="select * from 表名 where id ="&dataid
sql="update yinxiangorder set flag='0' where id ="&dataid
rs.open sql,conn,1,3

Response.Write(sql)
Response.Write("<script>alert('该条订单信息已经被删除,点击确定返回');location.href='跳转页面地址';</script>")
response.End()
end if
conn.close
set conn=nothing
%>
我该怎么操作?我只要删除一条数据
...全文
48 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
No1bigtooth 2009-09-27
  • 打赏
  • 举报
回复
得分的是正解
liuwei_IT_love 2009-09-27
  • 打赏
  • 举报
回复
sql="delete from 表名 where id ="&dataid
No1bigtooth 2009-09-27
  • 打赏
  • 举报
回复
恩,好的
sy_binbin 2009-09-27
  • 打赏
  • 举报
回复
if Request("action")="delete"

把红色参数的值改成不是delete的就试试
number123456 2009-09-27
  • 打赏
  • 举报
回复
rs.open "select * table 条件",conn,1,3
if not rs.eof then
rs.delete
rs.update
end if
rs.close

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧