| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 205 人关注过本帖
标题:在线求教~
只看楼主 加入收藏
wanghonggu
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2007-11-2
收藏
 问题点数:0 回复次数:0 
在线求教~

<tr>
<td background="images/index_08.jpg" width="299" height="100" alt="" valign="top"> <table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td>&nbsp;</td></tr>
<!--#include file="conn.asp"--><%
set rs=server.CreateObject("adodb.recordset")
sql="select top 3 * from Feedback order by id desc"
rs.open sql,conn,1,1
while not rs.eof
%>
<tr>
<td width="37%" height="25">&nbsp;</td>
<td width="56%" valign="top"><a href="showonewords.asp?airid=<%=rs("id")%>"><%=left(rs("Title"),13)%></a></td>
<td width="7%">&nbsp;</td>
</tr><%
rs.movenext
wend
rs.close
set rs=nothing
%>
</table></td>
</tr>


<tr>
<td background="images/index_09.jpg" width="299" height="100" alt="" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0" height="20">
<tr><td>&nbsp;</td></tr>
<%
set rs=server.CreateObject("adodb.recordset")
sql="select top 6 * from Feedback order by id desc"
rs.open sql,conn,1,1
rs.movenext
rs.movenext
rs.movenext
while not rs.eof
%>
<tr>
<td width="37%" height="25">&nbsp;</td>
<td width="56%" valign="top" height="20"><a href="showonewords.asp?airid=<%=rs("id")%>"><%=left(rs("Title"),13)%></a></td>
<td width="7%">&nbsp;</td>
</tr>
<%
rs.movenext
wend
rs.close
set rs=nothing
%>
</table>
</td>
</tr>

当记录数少于3条的时候报错:
错误类型:
ADODB.Recordset (0x800A0BCD)
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。
/g广远国际贸易/side.asp, 第 45 行

上面的程序如何修改就可以当记录数条数少于3条的时候不报错~
帮忙修改一下程序~

[此贴子已经被作者于2007-11-2 14:30:49编辑过]

搜索更多相关主题的帖子: 在线 
2007-11-02 14:21
快速回复:在线求教~
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016472 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved