ADODB.Recordset 错误 '800a0bcd' BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求
在网站提交写好的文章的时侯,点击提交后出现这个错误,不知道怎么解决,跪求高手指点,怎么修改好,谢谢好人!代码如下;第19行出现错误rs("sid")=rs1("small...
在网站提交写好的文章的时侯,点击提交后出现这个错误,不知道怎么解决,跪求高手指点,怎么修改好,谢谢好人!代码如下; 第19行出现错误
rs("sid")=rs1("smallclassid") 19行
<%if session("password")="" then
response.redirect "index.asp"
response.end
end if%>
<!--#include file="connimg.asp"-->
<%
title=request("title")
SmallClassName=request("SmallClassName")
content=request.form("content")
tj=request("tj")
set rs=server.createobject("adodb.recordset")
sql="select * from NEWS where (id is null)"
rs.open sql,conn,1,3
set rs1=server.createobject("adodb.recordset")
sql1="select * from class where smallclassname='"&request("smallclassname")&"'"
rs1.open sql1,conn,1,1
rs.addnew
rs("title")=title
rs("sid")=rs1("smallclassid") 19行
rs("SmallClassName")=SmallClassName
rs("content")=content
if tj<>"" then rs("tj") =tj
rs.update
rs1.close
set rs1=nothing
rs.close
set rs=nothing
response.write "<script language='javascript'>" & chr(13)
response.write "alert('新闻提交成功!');" & Chr(13)
response.write "window.document.location.href='index.asp';"&Chr(13)
response.write "</script>" & Chr(13)
Response.End
%> 展开
rs("sid")=rs1("smallclassid") 19行
<%if session("password")="" then
response.redirect "index.asp"
response.end
end if%>
<!--#include file="connimg.asp"-->
<%
title=request("title")
SmallClassName=request("SmallClassName")
content=request.form("content")
tj=request("tj")
set rs=server.createobject("adodb.recordset")
sql="select * from NEWS where (id is null)"
rs.open sql,conn,1,3
set rs1=server.createobject("adodb.recordset")
sql1="select * from class where smallclassname='"&request("smallclassname")&"'"
rs1.open sql1,conn,1,1
rs.addnew
rs("title")=title
rs("sid")=rs1("smallclassid") 19行
rs("SmallClassName")=SmallClassName
rs("content")=content
if tj<>"" then rs("tj") =tj
rs.update
rs1.close
set rs1=nothing
rs.close
set rs=nothing
response.write "<script language='javascript'>" & chr(13)
response.write "alert('新闻提交成功!');" & Chr(13)
response.write "window.document.location.href='index.asp';"&Chr(13)
response.write "</script>" & Chr(13)
Response.End
%> 展开
1个回答
展开全部
试试我修改下的代码:
<%if session("password")="" then
response.redirect "index.asp"
response.end
end if%>
<!--#include file="connimg.asp"-->
<%
title=request("title")
SmallClassName=request("SmallClassName")
content=request.form("content")
tj=request("tj")
set rs1=server.createobject("adodb.recordset")
sql1="select * from [class] where smallclassname='"&SmallClassName&"'"
rs1.open sql1,conn,1,1
set rs=server.createobject("adodb.recordset")
sql="select * from NEWS where (id is null)"
rs.open sql,conn,1,3
rs.addnew
rs("title")=title
rs("sid")=rs1("smallclassid")
rs("SmallClassName")=SmallClassName
rs("content")=content
if tj<>"" then rs("tj") =tj
rs.update
rs1.close
set rs1=nothing
rs.close
set rs=nothing
response.write "<script language='javascript'>" & chr(13)
response.write "alert('新闻提交成功!');" & Chr(13)
response.write "window.document.location.href='index.asp';"&Chr(13)
response.write "</script>" & Chr(13)
Response.End
%>
<%if session("password")="" then
response.redirect "index.asp"
response.end
end if%>
<!--#include file="connimg.asp"-->
<%
title=request("title")
SmallClassName=request("SmallClassName")
content=request.form("content")
tj=request("tj")
set rs1=server.createobject("adodb.recordset")
sql1="select * from [class] where smallclassname='"&SmallClassName&"'"
rs1.open sql1,conn,1,1
set rs=server.createobject("adodb.recordset")
sql="select * from NEWS where (id is null)"
rs.open sql,conn,1,3
rs.addnew
rs("title")=title
rs("sid")=rs1("smallclassid")
rs("SmallClassName")=SmallClassName
rs("content")=content
if tj<>"" then rs("tj") =tj
rs.update
rs1.close
set rs1=nothing
rs.close
set rs=nothing
response.write "<script language='javascript'>" & chr(13)
response.write "alert('新闻提交成功!');" & Chr(13)
response.write "window.document.location.href='index.asp';"&Chr(13)
response.write "</script>" & Chr(13)
Response.End
%>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询