错误的"next"

zhouqing2542 2008-04-21 10:18:03
<%

r1=request.form("r1")
if tp="danwei" then %>
<tr>
<td height="636" align="center" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="6" class="font_12_23"> <%
set rs1=server.CreateObject("adobd.recordset")
rs1.open "select * from chaxun where danwei ",conn,1,1
if rs1.eof or rs1.bof then
%><tr>
<td colspan="2">暂无信息..</td>
</tr>
<%
else

%>
<tr>
<td width="15%" height="34" align="center">单位:</td>
<td width="85%" align="left"><%=rs1("danwei")%></td>
</tr>
<tr>
<td height="29" align="center">电话:</td>
<td height="29" align="left"><%=rs1("tel")%></td>
</tr>

<%

rs1.movenext
next //这行的next
rs1.close
end if
%>
</table></td></tr>
<%
elseif r1="tel" then
%>

<tr>

<td height="636" align="center" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="6" class="font_12_23">
<%

rs1.open "select * from chaxun where danwei ",conn,1,1
if rs1.eof or rs1.bof then
%> <tr>
<td colspan="2">暂无信息..</td>
</tr>
<%
else

%>
<tr>
<td width="15%" height="34" align="center">单位:</td>
<td width="85%" align="left"><%=rs1("danwei")%></td>
</tr>
<tr>
<td height="29" align="center">电话:</td>
<td height="29" align="left"><%=rs1("tel")%></td>
</tr> <%
rs1.movenext
next //这行的next 和上边的一样

rs1.close
end if
%></table></td>


</tr>
<%
rs.close
end if%>



错误的 'Next'
/earch.asp, line 153
...全文
200 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
银狐被占用 2008-04-21
  • 打赏
  • 举报
回复
还有一点,asp的注释是英文的单引,不是//
银狐被占用 2008-04-21
  • 打赏
  • 举报
回复
   <% 

r1=request.form("r1")
if tp="danwei" then %>
<tr>
<td height="636" align="center" valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="6" class="font_12_23"> <%
set rs1=server.CreateObject("adobd.recordset")
rs1.open "select * from chaxun where danwei ",conn,1,1
if rs1.eof or rs1.bof then
%> <tr>
<td colspan="2">暂无信息.. </td>
</tr>
<%
else
for i=1 to rs1.recordcount
%>
<tr>
<td width="15%" height="34" align="center">单位: </td>
<td width="85%" align="left"> <%=rs1("danwei")%> </td>
</tr>
<tr>
<td height="29" align="center">电话: </td>
<td height="29" align="left"> <%=rs1("tel")%> </td>
</tr>

<%

rs1.movenext
next //这行的next
rs1.close
end if
%>
</table> </td> </tr>
<%
elseif r1="tel" then
%>

<tr>

<td height="636" align="center" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="6" class="font_12_23">
<%

rs1.open "select * from chaxun where danwei ",conn,1,1
if rs1.eof or rs1.bof then
%> <tr>
<td colspan="2">暂无信息.. </td>
</tr>
<%
else
for i=1 to rs1.recordcount
%>
<tr>
<td width="15%" height="34" align="center">单位: </td>
<td width="85%" align="left"> <%=rs1("danwei")%> </td>
</tr>
<tr>
<td height="29" align="center">电话: </td>
<td height="29" align="left"> <%=rs1("tel")%> </td>
</tr> <%
rs1.movenext
next //这行的next 和上边的一样

rs1.close
end if
%> </table> </td>


</tr>
<%
rs.close
end if%>
银狐被占用 2008-04-21
  • 打赏
  • 举报
回复
<%

r1=request.form("r1")
if tp="danwei" then %>
<tr>
<td height="636" align="center" valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="6" class="font_12_23"> <%
set rs1=server.CreateObject("adobd.recordset")
rs1.open "select * from chaxun where danwei ",conn,1,1
if rs1.eof or rs1.bof then
%> <tr>
<td colspan="2">暂无信息.. </td>
</tr>
<%
else
for i=1 to rs1.recordcount
%>
<tr>
<td width="15%" height="34" align="center">单位: </td>
<td width="85%" align="left"> <%=rs1("danwei")%> </td>
</tr>
<tr>
<td height="29" align="center">电话: </td>
<td height="29" align="left"> <%=rs1("tel")%> </td>
</tr>

<%

rs1.movenext
next //这行的next
rs1.close
end if
%>
</table> </td> </tr>
<%
elseif r1="tel" then
%>

<tr>

<td height="636" align="center" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="6" class="font_12_23">
<%

rs1.open "select * from chaxun where danwei ",conn,1,1
if rs1.eof or rs1.bof then
%> <tr>
<td colspan="2">暂无信息.. </td>
</tr>
<%
else
for i=1 to rs1.recordcount
%>
<tr>
<td width="15%" height="34" align="center">单位: </td>
<td width="85%" align="left"> <%=rs1("danwei")%> </td>
</tr>
<tr>
<td height="29" align="center">电话: </td>
<td height="29" align="left"> <%=rs1("tel")%> </td>
</tr> <%
rs1.movenext
next //这行的next 和上边的一样

rs1.close
end if
%> </table> </td>


</tr>
<%
rs.close
end if%>
zhouqing2542 2008-04-21
  • 打赏
  • 举报
回复
去掉之后还是报错 .
lihuasoft 2008-04-21
  • 打赏
  • 举报
回复
没有循环的上端,突然冒出一个循环的下端,不错才怪呢

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧