为什么execute语句不会执行

havy505 2006-02-10 08:07:59
添加的语句不能执行,但换了删除的却可以不知道怎么回事
if check="add" then

username=trim(request("username"))
password=trim(request("password"))
if username="" or password="" then
Response.Write ("<script>alert('请填写管理员名和密码!');javascript:history.back(0)</script>")
response.end
end if
conn.execute("insert into rsadmin(username,password)values('"&username&"','"&password&"')")
conn.close

Response.Write ("<script>alert('管理员已添加!');window.location='admin.asp'</script>")
response.end
end if
删除语句:
if check="delete" then
id=request("id")
username=trim(request("username"))
password=trim(request("password"))
sql="delete from rsadmin where id="&id
conn.Execute(sql)
conn.close
response.Redirect "admin_user.asp"
response.end
end if
...全文
179 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
astly2004 2006-02-10
  • 打赏
  • 举报
回复
调试一下看报什么错误,把错误打出来就知道了
KimSoft 2006-02-10
  • 打赏
  • 举报
回复
conn.execute("insert into rsadmin ([username],[password]) values ('"&username&"','"&password&"')")

28,390

社区成员

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

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