各位帮忙看一下,小弟不胜感激!

海大富运动 2004-02-02 10:05:24
错误类型:
ADODB.Recordset (0x800A0BCD)
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。
/www/nei/sub_paper.asp, 第 38 行



sub_paper.asp文件的sql代码是这样的
<!--#include file=../system/include/config.asp-->
<!--#include file=../share/conn_news.asp-->
<!--#include file=../system/include/function.asp-->
<html>
<head>
<title><%=title%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../style.css" type="text/css">
</head>
<%
dim strSql,rs,i,PageNo,yy

if request("type")="" then
response.write "对不起,参数出错了!请重新访问此页!"
response.end
end if
if request("type")=1 then
yy="购房指南"
end if
if request("type")=2 then
yy="租房指南"
end if
if request("type")=3 then
yy="政策法规"
end if
if request("type")=4 then
yy="银行贷款"
end if
if request("type")=5 then
yy="家居装饰"
end if
if request("type")=6 then
yy="土地评估"
end if
strSql="select * from [paper] where id=" & request("id")
set rs=Server.CreateObject("ADODB.RecordSet")
rs.open strSql,conn,3,3

sub showContent
dim i
i=0
%>
<%do while not rs.eof%>
<% i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop%>
<%
rs.update
end sub
%>


问题是后台对新闻进行删除后,主页无法更新,那位大哥帮忙一下
...全文
39 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
海大富运动 2004-02-02
  • 打赏
  • 举报
回复

<%
dim bt,image,tttt
function paper(bt,image,tttt)
response.write "<table width=""295"" border=""0"" cellspacing=""0"" cellpadding=""0"">"
response.write "<tr align=""left"" valign=""top"">"
response.write "<td width=""8""><img src=""images/index3_r1_c1.gif"" width=""8"" height=""20""></td>"
response.write "<td width=""282"" background=""images/index3_r1_c3.gif"" valign=""bottom"" class=""smallfont""><font color=""#FF6600""><b>" & bt & "</b></font></td>"
response.write "<td width=""10""><img src=""images/index3_r1_c14.gif"" width=""8"" height=""20""></td>"
response.write "</tr>"
response.write "</table>"
response.write "<table width=""295"" border=""0"" cellspacing=""0"" cellpadding=""0"">"
response.write "<tr>"
response.write "<td width=""184"" align=""right"" height=""4""><img src=""images/index_r20_c15.gif"" width=""180"" height=""3""></td>"
response.write "<td width=""109"" align=""right"" valign=""top"" height=""4""><img src=""images/index3_r2_c12.gif"" width=""112"" height=""7""></td>"
response.write "</tr>"
response.write "</table>"
response.write "<table width=""295"" border=""0"" cellspacing=""0"" cellpadding=""0"">"

strSql="select top 6 * from [paper] where type='" & tttt & "' order by id desc"
set rs=Server.CreateObject("ADODB.RecordSet")
rs.open strSql,conn,1,3
response.write "<tr>"
response.write "<td height=""118"" align=""left"" valign=""top"" width=""208"">"
do while not rs.eof
response.write "<font color=""#FF6600"" class=""smallfont"">·</font><a href=" & "nei/sub_paper.asp?id=" & rs("id") & "&type=" & tttt & " target=""_blank"" class=""linkfont""><font color=" & rs("color") & ">" & rs("title") & "</font></a>"
rs.movenext
if not rs.eof then
response.write "<br>"
end if
loop
response.write "</td>"
response.write "<td align=""center"" valign=""middle"" width=""86"" height=""118""><img src=" & "images/index3_image" & image & ".jpg width=""67"" height=""67""><br>"
response.write "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"">"
response.write "<tr>"
response.write "<td align=""center"" valign=""middle"" height=""21""><a href=" & "nei/view_paper.asp?type=" & tttt & " class=""ffbyfont2"">[更多信息]</a></td>"
response.write "</tr>"
response.write "</table>"
response.write "</td>"
response.write "</tr>"
response.write "</table>"
end function
%>


海大富运动 2004-02-02
  • 打赏
  • 举报
回复
request("id")的上个页面应该是这个,大家帮帮忙!拜托了,各位
海大富运动 2004-02-02
  • 打赏
  • 举报
回复
非常感谢各位!我qq是123714162,请给以现场指导——小虾米!
hongmaohouzi 2004-02-02
  • 打赏
  • 举报
回复
<meta http-equiv="refresh" content="5">//5秒页面自动刷新
可以定时更新数据!
芝城游侠 2004-02-02
  • 打赏
  • 举报
回复
出现这样错误的原因是你要查询的信息在数据库中不存在。

你的request("id")从哪里取值?

后台删除以后,主页刷新后不就可以更新了吗?你是什么意思?
x_gn 2004-02-02
  • 打赏
  • 举报
回复
rs.update语句出错,你这句话是什么意思?
snower01 2004-02-02
  • 打赏
  • 举报
回复
strSql="select * from [paper] where id=" & request("id"),你的ID值从哪来的?
没有付值。
TrueAndFalse 2004-02-02
  • 打赏
  • 举报
回复
strSql="select * from [paper] where id=" & request("id")
^^^^^^^^^^^^^^
在哪儿?
hnfz123 2004-02-02
  • 打赏
  • 举报
回复
出错的意识是数据库中没有记录呀,数据库中加入记录后看看!!
等待888 2004-02-02
  • 打赏
  • 举报
回复
请检查一下你的requset("id")有没有得到上个页面的一个值
sunway8110 2004-02-02
  • 打赏
  • 举报
回复
SELECT的时候,并不存在该ID号

28,407

社区成员

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

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