菜鸟求助!!!(好急啊)

richardsmith 2003-11-16 07:46:49
求助!!!(好急啊)
论坛的问题:
我下了一个bbsxp3000,按说明做了论坛帖子的引用,可是帖子上的链接就是不对,
单击后,出现如下信息:
ADODB.Field 错误 '800a0bcd'

BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。

/ShowPost.asp,行13

我试图改,但是找不到代码.......
(另:我觉得链接的外观看上去十分不爽,但是也找不到代码......
我都找了一天半了,急死了!!!~~~)
郁闷啊~~~
...全文
43 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhengxianping 2003-11-17
  • 打赏
  • 举报
回复
你的表里可能没有数据你检查一下
我以前遇到同样的问题
DeltaCat 2003-11-17
  • 打赏
  • 举报
回复
Conn.Execute("Select cluburl From clubconfig")返回一个记录集,
相当于 recordset,
后面加 (0)就是取第一元素值
richardsmith 2003-11-16
  • 打赏
  • 举报
回复
cluburl=Conn.Execute("Select cluburl From clubconfig")(0)这一句是什么意思???
kanshangren 2003-11-16
  • 打赏
  • 举报
回复
在数据库里添点东西
arcow 2003-11-16
  • 打赏
  • 举报
回复
不会吧连代码也找不到是不是在<!-#include -->文件中
richardsmith 2003-11-16
  • 打赏
  • 举报
回复
我在论坛里能看到我发的帖子啊,
但是在那个引用的页面里的链接有问题
那个引用的代码是
<script src=new.asp?forumid=1&TopicCount=1&TitleCount=15&timeCount=1></script>


new.asp的代码如下:
<!-- #include file="conn.asp" -->
<%
'=========================================================
' 调用代码
' <script src=new.asp?forumid=1&TopicCount=10&TitleCount=15&timeCount=1></script> 全部论坛帖子
' forumid: 指定论坛的ID
' TopicCount: 显示多少条主题
' TitleCount: 标题长度
' timeCount: 1=显示时间 0=不显示时间
'=========================================================
' Copyright (C) 1998-2004 Yuzi.Net. All rights reserved.
' Web: http://www.yuzi.net,http://www.bbsxp.com
' Email: huangzhiyu@yuzi.net
'=========================================================


if Request("TopicCount")=empty then
TopicCount=10
else
TopicCount=int(Request("TopicCount"))
end if

if Request("TitleCount")=empty then
TitleCount=15
else
TitleCount=int(Request("TitleCount"))
end if



Set conn=Server.CreateObject("ADODB.Connection")
conn.open ConnStr
cluburl=Conn.Execute("Select cluburl From clubconfig")(0)

if Request("forumid") = empty then
sql="select top "&TopicCount&" id,icon,topic,lasttime from forum where deltopic=0 order by id desc"
else
sql="select top "&TopicCount&" id,icon,topic,lasttime from forum where forumid="&Request("forumid")&" and deltopic=0 order by id desc"
end if

Set rs = Server.CreateObject("ADODB.Recordset")
rs.open sql,conn
do while Not RS.Eof

if Request("timeCount")=1 then
response.write "document.write(' <img src="&cluburl&"/images/brow/"&rs("icon")&".gif> <a href="&cluburl&"/ShowPost.htm?id="&rs("id")&" target=_blank>"&left(rs("Topic"),TitleCount)&"</a> ["&rs("lasttime")&"]<br>');"
else
response.write "document.write(' <img src="&cluburl&"/images/brow/"&rs("icon")&".gif> <a href="&cluburl&"/ShowPost.htm?id="&rs("id")&" target=_blank>"&left(rs("Topic"),TitleCount)&"</a><br>');"
end if

RS.MoveNext
Loop
rs.close
set rs=nothing
conn.close
set conn=nothing
%>


conn.asp的代码是:
<%
IsSqlDataBase=0 '定义数据库类别,0为Access数据库,1为SQL数据库
If IsSqlDataBase=0 Then
'''''''''''''''''''''''''''''' Access数据库 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''
datapath ="database/" '数据库目录的相对路径
datafile ="bbsxp.mdb" '数据库的文件名
Connstr="DBQ="&server.mappath(""&datapath&""&datafile&"")&";DRIVER={Microsoft Access Driver (*.mdb)};"
SqlNowString="Now()"
ver="3.0"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Else
'''''''''''''''''''''''''''''' SQL数据库 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
SqlLocalName ="127.0.0.1" '连接IP
SqlUsername ="sa" '用户名
SqlPassword ="1" '用户密码
SqlDatabaseName="bbsxp" '数据库名
ConnStr = "Provider=Sqloledb; User ID=" & SqlUsername & "; Password=" & SqlPassword & "; Initial Catalog = " & SqlDatabaseName & "; Data Source=" & SqlLocalName & ";"
SqlNowString="GetDate()"
ver="3.0 SQL"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
End If
%>
flying423 2003-11-16
  • 打赏
  • 举报
回复
数据库里没有数据才有你的错误,那断代码可能在引用里。
richardsmith 2003-11-16
  • 打赏
  • 举报
回复
我能成功引用帖子啊!
但问题是帖子上的链接不对.......
richardsmith 2003-11-16
  • 打赏
  • 举报
回复
但是页面里选中是那个脚本标记啊,选中不了链接,怎么办呢???
超级大笨狼 2003-11-16
  • 打赏
  • 举报
回复
或者你先随便添点数据进库
超级大笨狼 2003-11-16
  • 打赏
  • 举报
回复
加上if not rs.eof then
因为你没找到满足条件的记录,所以出错。
nchen123 2003-11-16
  • 打赏
  • 举报
回复
如果你连代码的位置都找不到的话,建议是用用 Dreamweaver 或者 Frontpage 这类的可视化工具。
可以在页面里选中链接后切换到代码视图。

28,405

社区成员

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

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