asp 对象关闭时,不允许操作
calllink_datebaseifrequest("delid")<>""thenconn.execute("delete*fromliuyanbanwhereid=...
call link_datebase
if request("delid")<>"" then
conn.execute("delete * from liuyanban where id="&request("delid")&"")
end if
if request("editid")<>"" then
set rs=conn.execute("select * from liuyanban where id="&request("editid")&"")
if not rs.eof then
zuozhe=rs("username")
biaoti=rs("title")
neirong=rs("content")
end if
end if
dim rs,sql
set rs=server.CreateObject("adodb.recordset")
sql="select * from liuyanban where 1=1"
select case request.Form("type")
case "zuozhe"
sql=sql&" and username like '%"&request.Form("key")&"%'"
case "biaoti"
sql=sql&" and title like '%"&request.Form("key")&"%'"
case "neirong"
sql=sql&" and content like '%"&request.Form("key")&"%'"
case else
end select
if request("action")="提交" then
set rs=server.CreateObject("adodb.recordset")
sql="select * from liuyanban where 1=1"
if request("editid")<>"" then
sql=sql&"and id="&request("editid")&""
end if
rs.open sql,conn,1,3
if request("editid")="" then
rs.addnew
end if
rs("username")=request("username")
rs("title")=request("title")
rs("content")=request("content")
rs.update
up.close
response.Redirect("liuyanban.asp")
end if
怎么解决 展开
if request("delid")<>"" then
conn.execute("delete * from liuyanban where id="&request("delid")&"")
end if
if request("editid")<>"" then
set rs=conn.execute("select * from liuyanban where id="&request("editid")&"")
if not rs.eof then
zuozhe=rs("username")
biaoti=rs("title")
neirong=rs("content")
end if
end if
dim rs,sql
set rs=server.CreateObject("adodb.recordset")
sql="select * from liuyanban where 1=1"
select case request.Form("type")
case "zuozhe"
sql=sql&" and username like '%"&request.Form("key")&"%'"
case "biaoti"
sql=sql&" and title like '%"&request.Form("key")&"%'"
case "neirong"
sql=sql&" and content like '%"&request.Form("key")&"%'"
case else
end select
if request("action")="提交" then
set rs=server.CreateObject("adodb.recordset")
sql="select * from liuyanban where 1=1"
if request("editid")<>"" then
sql=sql&"and id="&request("editid")&""
end if
rs.open sql,conn,1,3
if request("editid")="" then
rs.addnew
end if
rs("username")=request("username")
rs("title")=request("title")
rs("content")=request("content")
rs.update
up.close
response.Redirect("liuyanban.asp")
end if
怎么解决 展开
展开全部
那一句话提示的?
你的代码也有问题,更新数据的时候不用使用
if request("editid")="" then
rs.addnew
是不是搞错了,应该是ADD?
你的代码也有问题,更新数据的时候不用使用
if request("editid")="" then
rs.addnew
是不是搞错了,应该是ADD?
追问
报 55行的错 55行代码是 if rs.eof and rs.bof then
求解
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询