免费视频|新人指南|投诉删帖|广告合作|地信网APP下载

查看: 1971|回复: 1
收起左侧

[求助] 数据库出现ADODB.Field 错误 '800a0bcd' 的问题求助

[复制链接]

7656

主题

1180

铜板

2299

好友

技术员

为地信喝彩!

积分
106237
QQ
发表于 2013-1-10 13:27 | 显示全部楼层 |阅读模式
ADODB.Field 错误 '800a0bcd'
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。
/fun/add_article_all.asp,行 136

网站代码如下:
  1. <!--#include file="../include/function.asp" -->
  2. <!--#include file="conn.asp" -->
  3. <%
  4. '总配置
  5. Set rs=server.CreateObject("adodb.recordset")
  6. sql="select * from config"
  7. rs.open sql,conn,1,1
  8. sitename=rs("sitename")
  9. siteurl=rs("siteurl")
  10. mini=rs("mini")
  11. style=rs("style")
  12. copyright=rs("copyright")
  13. rs.close
  14. Set rs=Nothing

  15. '菜单配置
  16. Set navrs=server.CreateObject("adodb.recordset")
  17. navsql="select * from nav order by sort asc"
  18. navrs.open navsql,conn,1,1
  19. If Not navrs.eof Then
  20. Do While Not navrs.eof
  21. nav=nav&"<li><a href='../product/buy.asp?cat=nav&pid="&navrs("id")&"' target='_blank'>"&navrs("navname")&"</a></li>"
  22. navrs.movenext
  23. loop
  24. End if
  25. navrs.close
  26. Set navrs=nothing

  27. '热点咨讯

  28. Set rshot=server.CreateObject("adodb.recordset")
  29. rshotsql="select * from article where hot=1 order by date desc"
  30. rshot.open rshotsql,conn,1,1
  31. hot=""
  32. For i=1 To 10
  33. If rshot.eof Then Exit For
  34. hottitle=rshot("title")
  35. hotdate=FormatDate(rshot("date"),6)
  36. hotid=rshot("id")
  37. sid=rshot("sid")
  38. Set rsc=server.CreateObject("adodb.recordset")
  39. rscsql="select * from [class] where id="&sid
  40. rsc.open rscsql,conn,1,1
  41. hot=hot&"<li><em>["&hotdate&"]</em><img src='../images/face/"&i&".gif'><a href='../"&rsc("ename")&"/"&hotid&".html' target='_blank' title='"&hottitle&"'>"&chang(hottitle,25)&"</a></li> "& vbcrlf
  42. rshot.movenext
  43. next
  44. rshot.close
  45. Set rsc=nothing
  46. set rshot=Nothing

  47. '右侧推广商品

  48. Set prors1=server.CreateObject("adodb.recordset")
  49. sqlpro1="select * from product where rmp=3 order by xiao desc"
  50. prors1.open sqlpro1,conn,1,1
  51. h=0
  52. Do while Not prors1.eof
  53. protitle1=prors1("title")
  54. procontent1=prors1("content")

  55. prourl1=prors1("url")
  56. proid1=prors1("id")
  57. proprice1=prors1("price")
  58. h=h+1
  59. product=product&"<dl>"& vbcrlf
  60. product=product&"<dt><a href='../product/buy.asp?cat=list&pid="&proid1&"' target='_blank'><img src='"&prourl1&"' alt='"&protitle1&"' /></a></dt>"& vbcrlf
  61. product=product&"<dd><a href='../product/buy.asp?cat=list&pid="&proid1&"' target='_blank'>"&protitle1&"</a></dd>"& vbcrlf
  62. product=product&"<dd class='jia'>优惠价:<span class='red'>"&proprice1&" 元</span></dd>"& vbcrlf
  63. product=product&"<dd><a href='../product/buy.asp?cat=list&pid="&proid1&"' target='_blank'><img src='../images/btn.gif' alt='查看详情'/></a></dd>"& vbcrlf
  64. product=product&"</dl>"& vbcrlf
  65. prors1.movenext
  66. Loop
  67. prors1.close
  68. Set prors1=Nothing

  69. '生成全部静态页面
  70. response.write "重新生成全部页面....

  71. "
  72. Set rsall=server.CreateObject("adodb.recordset")
  73. sqlall="select * from article"
  74. rsall.open sqlall,conn,1,1
  75. dd=0
  76. Do While Not rsall.eof
  77. dd=dd+1
  78. showid=rsall("id")
  79. idsid=rsall("sid")
  80. Set rs=server.CreateObject("adodb.recordset")
  81. sql="select * from [class] where id="&idsid
  82. rs.open sql,conn,1,1
  83. classname=rs("ename")
  84. classzname=rs("zname")
  85. Set rss=server.CreateObject("adodb.recordset")
  86. sqls="select * from article where id="&showid
  87. rss.open sqls,conn,1,1
  88. If Not rss.eof Then
  89. rsstitle=rss("title")
  90. rsscontent=rss("content")
  91. rsslaiyuan=rss("laiyuan")
  92. rsszuoze=rss("zuoze")
  93. htmlurl=siteurl&"/"&classname&"/"&rss("id")&".html"
  94. rssdate=FormatDate(rss("date"),1)
  95. rsskeywords=rss("keywords")
  96. rssdesc=rss("desc")
  97. rss.close
  98. Set rss=nothing
  99. End If

  100. Set rs=server.CreateObject("adodb.recordset")
  101. sql="select * from article where id<"&showid&" order by id desc"
  102. rs.open sql,conn,1,1
  103. If Not rs.eof then
  104. sidid2=rs("sid")
  105. Set rs2=server.CreateObject("adodb.recordset")
  106. sql2="select * from [class] where id="&sidid2
  107. rs2.open sql2,conn,1,1
  108. classname2=rs2("ename")
  109. rs2.close
  110. End if

  111. If rs.eof Then
  112. nextlist1="<dd>上一篇:<span>没有了</span></dd>"
  113. rs.close
  114. Set rs=nothing
  115. else
  116. nextlist1="<dd>上一篇:<span><a href='../"&classname2&"/"&rs("id")&".html'>"&rs("title")&"</a></span></dd>"
  117. rs.close
  118. Set rs=nothing
  119. End if
  120. Set rs=server.CreateObject("adodb.recordset")
  121. sql="select top 1 * from article where id>"&showid&" order by id asc"
  122. rs.open sql,conn,1,1
  123. If Not rs.eof Then
  124. sidid3=rs("sid")
  125. Set rs3=server.CreateObject("adodb.recordset")
  126. sql3="select * from [class] where id="&sidid3
  127. rs3.open sql3,conn,1,1
  128. classname3=rs3("ename")
  129. rs3.close
  130. End if
  131. If rs.eof then
  132. nextlist2="<dd>下一篇:<span>没有了</span></dd>"
  133. rs.close
  134. Set rs=nothing
  135. else
  136. nextlist2="<dd>下一篇:<span><a href='../"&classname3&"/"&rs("id")&".html'>"&rs("title")&"</a></span></dd>"
  137. rs.close
  138. Set rs=nothing
  139. End If

  140. templatefile="../template/article.html"
  141. Set fso=server.CreateObject("scripting.filesystemobject")
  142. Set ts=fso.opentextfile(server.mappath(templatefile),1)
  143. content=ts.readall
  144. Set ts=Nothing
  145. content=Replace(content,"{sitename}",sitename)
  146. content=Replace(content,"{siteurl}",siteurl)
  147. content=Replace(content,"{mini}",mini)
  148. content=Replace(content,"{keywords}",keywords)
  149. content=Replace(content,"{desc}",desc)
  150. content=Replace(content,"{copyright}",copyright)
  151. content=Replace(content,"{product}",product)
  152. content=Replace(content,"{hot}",hot)
  153. content=Replace(content,"{hig}",Hig)
  154. content=Replace(content,"{style}",style)
  155. content=Replace(content,"{rsstitle}",rsstitle)
  156. content=Replace(content,"{rsscontent}",rsscontent)
  157. content=Replace(content,"{rssdate}",rssdate)
  158. content=Replace(content,"{rsskeywords}",rsskeywords)
  159. content=Replace(content,"{rssdesc}",rssdesc)
  160. content=Replace(content,"{rsslaiyuan}",rsslaiyuan)
  161. content=Replace(content,"{rsszuoze}",rsszuoze)
  162. content=Replace(content,"{classzname}",classzname)
  163. content=Replace(content,"{classname}",classname)
  164. content=Replace(content,"{htmlurl}",htmlurl)
  165. content=Replace(content,"{nextlist1}",nextlist1)
  166. content=Replace(content,"{nextlist2}",nextlist2)
  167. content=Replace(content,"{nav}",nav)
  168. htmlfile=classname&"/"&showid&".html"
  169. Set writefile=fso.opentextfile(server.mappath("../"&htmlfile),2,true)
  170. writefile.writeline(content)
  171. Set writefile=Nothing
  172. Set fso=Nothing
  173. sql="Update article set html=true,htmlurl='"&htmlfile&"' where id="&showid
  174. conn.execute(sql)
  175. If Not Err Then response.write ("<a href='../"&htmlfile&"' target='_blank'>/"&htmlfile&"</a> <span style='color:green;'>生成成功!</span></br>")
  176. response.flush
  177. rsall.movenext
  178. loop
  179. rsall.close
  180. Set rsall=Nothing
  181. conn.close
  182. Set conn=Nothing
  183. response.write "
  184. <span style='color:red;'>全部生成完毕!共"&dd&"条</span> <a href='../admin/admin_add.asp'>返回列表</a>"
  185. response.write "<script>alert('更新完成,共"&dd&"条');</script>"
  186. %>
复制代码
地质啷http://weibo.com/943569550

7711

主题

31万

铜板

892

好友

超级版主

地信网论坛贵宾

Rank: 17Rank: 17Rank: 17Rank: 17Rank: 17

积分
128764

宣传勋章优秀斑主灌水勋章活跃勋章贡献勋章童话节勋章

QQ
发表于 2013-1-10 14:16 | 显示全部楼层
这个不懂呀

评分

参与人数 1铜板 +1 收起 理由
admin + 1 亲,你好快哦~~~

查看全部评分

该会员没有填写今日想说内容.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

在线客服
快速回复 返回顶部 返回列表