回 帖 发 新 帖 刷新版面

主题:最新最新的ASP错误,请求高人指点(急)

<%
sub tuijian(BigClass,SmallClass,ArticleNum,TitleLen,Tops,Tui,Jing,Order,LinkPage) 
Tuijian_List="" 
Tuijian_List= Tuijian_List & "select top "&ArticleNum&" * " 
if BigClass=0 and SmallClass<>0 Then 
Tuijian_List= Tuijian_List & "from artic where ty="&SmallClass&"" 
elseif SmallClass=0 and BigClass<>0 then 
Tuijian_List= Tuijian_List & "from artic where bg_ty="&BigClass&"" 
elseif SmallClass=0 and BigClass=0 then 
Tuijian_List= Tuijian_List & "from artic where 2=2" 
end if 
if Tops=1 then 
Tuijian_List= Tuijian_List & "and Tops=true" 
end if 
if Tui=1 then 
Tuijian_List= Tuijian_List & "and Tui=true" 
end if 
if Jing=1 then 
Tuijian_List= Tuijian_List & "and Jing=true" 
end if 
if Order=1 then 
Order="clicked" 
else 
Order="id desc" 
end if 

Tuijian_List= Tuijian_List & " order by "&Order&"" set ArcList=wpconn.execute(Tuijian_List) 
if ArcList.eof and ArcList.bof then 
response.write("没有信息!") 
else 
do while not ArcList.eof 
set lanmu=wpconn.execute("select * from [class] where class_id="&ArcList("ty")&"") 
%> 
<table width="98%" border="0" cellspacing="0" cellpadding="0"><tr><td width="33%" height="20">[<a href='/class.asp?classid=<%=lanmu("class_id")%>' target="_blank"><%=lanmu("class_name")%></a>]</td> 
<td width="67%"><a href="<%=SiteUrl%>/<%=LinkPage%>?id=<%=ArcList("id")%>" target="_blank" title="<%=ArcList("title")%>"><font color="<%=ArcList("title_color")%>"><%=left(ArcList("title"),TitleLen)%></font></a> <%if ArcList("tui")=true and ArcList("bg_ty")=1 then %><img src="../images/hot.gif" /><%end if%></td></tr></table> 
<% 
ArcList.movenext 
loop 
end if 
'List.close 
'set List=nothing 
end sub 
%>
[color=0000FF]以上过程我在页面中用<%Call tuijian(0,0,9,14,0,1,0,0,"ArticShow.asp")%> 语句调用时,浏览器提示如下出错信息:“BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。”请高人们指点一下,那几个条件式应该如何修正,期待你们的点拨。谢谢了![/color]

回复列表 (共3个回复)

沙发

你将里面生成的sql语句输出来看看是什么?然后拿到数据库运行一下,看看能不能找到记录?

板凳

set ArcList=wpconn.execute(Tuijian_List) 
这一句错误
应该是:
ArcList.open Tuijian_List,wpconn,1,1

3 楼

你手动在数据库里加一条记录看看?如果得的话,你就应该多加一个判断语句了!

我来回复

您尚未登录,请登录后再回复。点此登录或注册