come baby! asp错误:BOF 或 EOF 中有一个是“真

来源:百度知道 编辑:UC知道 时间:2024/09/21 01:32:49
<%
Dim rs,sql,projectNO
projectNO=session("projectNO")
set rs = Server.CreateObject("adodb.recordset")
sql=("select *from addresslist where state='1'order by id desc")
rs.open sql,conn,1,3
Dim RowCount,i
RowCount = 10 ' 每页显示的记录条数
Call TurnPage(Rs,RowCount)
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="navTxt" background="../../images/sleft2.gif" height="35">
<tr>
<td width="2%" height="35"><img src="../../images/sleft1.gif" width="8" height="34" /></td>
<td width="80%" height="35" valign="middle" align="left"><a href="javascript:void(openWin('shareadd.asp?id=<%=rs(0)%>', 800, 600));"><img s

If Not Rs.eof then
Do while Not Rs.eof and RowCount>0
这两行完全可以用一行搞定
do while rs.eof=false and rs.bof=false and rowCount=0
后面记得删掉end if
无论什么情况循环都只用一个not rs.eof的一概是noob.

没有考虑到记录为空的情况吧,呵呵