错误的"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
...全文
146 点赞 收藏 5
写回复
5 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
银狐被占用 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
没有循环的上端,突然冒出一个循环的下端,不错才怪呢
回复
相关推荐
发帖
ASP
创建于2007-09-28

2.8w+

社区成员

ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
申请成为版主
帖子事件
创建了帖子
2008-04-21 10:18
社区公告
暂无公告