[错误]缺少“loop”
<%sql="select * from paperpage where paper_NO="&news_NO&""
Set rs1=Server.CreateObject("ADODB.Recordset")
rs1.Open sql,conn,1,1
if rs1.eof and rs1.bof then
response.Write "<font color='ff0000'>当前没有相关信息!!</font>"
else
do while not rs1.eof%>
<tr><td><%=rs1("page")%>版 <%=rs1("pagename")%></tr></td>
<%
if rs1.eof then
exit do
else
rs1.movenext
end if
loop
end if%>
page是数字类型、输出来的结果就是1版、2版……24版等,但是我想1-9版的时候显示01、02、03……09这种形式的。
直接在<%=rs1("page")%>之前判断
<% 'dim pagename
'if rs1("page")=1 then pagename=01
'elseif rs1("page")=2 then pagename=02
'elseif rs1("page")=3 then pagename=03
'elseif rs1("page")=4 then pagename=04
'elseif rs1("page")=5 then pagename=05
'elseif rs1("page")=6 then pagename=06
'elseif rs1("page")=7 then pagename=07
'elseif rs1("page")=8 then pagename=08
'elseif rs1("page")=9 then pagename=09
'else pagename=rs1("page")
'end if%>
然后输出<%=pagename%>
就会显示缺少"loop"的错误,请问这种情况应该怎样处理??