为什么记录集的数量=-1?

yanboneck yanboneck 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
<%
Sql = "Select SpecialID,specialname from special"
set rs = conn.execute(sql)
CountClass=rs.recordcount
Response.Write(CountClass)
if not rs.eof then
do while not rs.eof
%>
<tr>
<td width="15%" height="25" align="center" valign="middle"><%=rs(0)%></td>
<td width="85%" height="25" valign="middle">
<input name="classid" type="checkbox" id="classid" value='<%=rs(0)%>'> <a href="admin_Class.asp?unid=<%=rs(0)%>"><%=rs(1)%></a>
<select name="OrderFlag<%=rs(0)%>">
<%
for i = 1 to CountClass
Response.write("<option ")
if rs(2) = i then Response.write("selected")
Response.write(" value="& i &">"& i &"</option>")
next
%>
</select>
</td>
</tr>
<%
rs.movenext
loop
else
Response.write "<tr><td align=center colspan=2 height=25>还没有添加专题</td></tr>"
end if
rs.close
%>
CountClass=-1,但是后面两个专题都能读出来这是为什么?
...全文
评论 4
收藏 已收藏
分享
返回顶部
yanboneck
ASP 28,401 成员 356,940 内容