错误类型:ADODB.Recordset (0x800A0BCD)BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的

来源:百度知道 编辑:UC知道 时间:2024/06/01 09:35:51
错误类型:ADODB.Recordset (0x800A0BCD)BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。
/mysite/look.asp, 第 22 行
<!-- #include file="conn.asp"-->
<%
function xhhtml(new_content)
xhhtml=new_content
if new_content<>"" then
xhhtml=replace(xhhtml,chr(13),"<br>")
xhhtml=replace(xhhtml,chr(34),""")
xhhtml=replace(xhhtml,chr(32)," ")
end if
end function
%>
<%
lookid=trim(request.form("new_id"))
set rs=server.createobject("adodb.recordset")
sql="select*from news where new_id='"&lookid&"'"
rs.open sql,conn,1,3
if new_count=""then
new_count=1
else
rs("new_count")=rs("new_count")+1
end if
rs.update

%>
<html>
<head>
<title>新闻显示页面</title>
<style type="text/css

缺少判断语句
解决
rs.open sql,conn,1,3
if rs.eof and rs.bof then '加入的代码
response.write"没有内容" '加入的代码
else '加入的代码
if new_count=""then

</html> '最后一行
<%end if%> '加入的代码