我测试了 xutao888(小丸子) 的不能用
用了下 menrock(教坏细路) 可以不过有个问题/问下
比如现在要从数据库中输出5条记录/就的把
for i =1 to 7
这样才能输出/否则只输出3条记录/
不知道那两条记录在那里损失了/没有分析出来
所以把程序改成一下的写法/
输出8条记录如下:
<%
i=1
m=8
do while i< m + 2
response.Write(rs("username")&"<br>")
if rs.eof then
rs.movefirst
else
rs.movenext
end if
i=i+1
loop
%>
sql="select top 5 test1 from table1"
rs.open sql,conn,1,3
do while not rs.eof
response.write(rs("test1"))
response.write "<br>"
rs.movenext
loop
if rs.recordcount<=5 then
rs.movefirst
j=1;
do while j<=5-rs.recordcount
response.write(rs("test1"))
rs.movefirst
loop
end if