当前位置: 代码迷 >> Web前端 >> 缺少LOOP异常
  详细解决方案

缺少LOOP异常

热度:214   发布时间:2012-10-06 17:34:01.0
缺少LOOP错误
错误前代码:
<tr class='trquery1' id="tr_reason" style="display:none">
    <td width='211'>不占用配额的原因:</td>
    <td width='619' align="left">
        <select name='sel_reason' id="sel_reason">
            <option value='0'>请选择</option>
            <%
				dim sql_sel_reason
                sql_sel_reason="SELECT id, reason FROM t_no_quota_reason_config where deleted=0"
                set rs_sel_reason=db.execute(sql_sel_reason)
                while not rs_sel_reason.eof
            %>
                    option value="<%=rs_sel_reason("id")%> ><%rs_sel_reason("reason")%></option>
            <%
                    rs_sel_reason.movenext
                wend
                rs_sel_reason.close
            %>
        </select>
    </td>
</tr>

修复后代码[红色区域是修改的地方]:
<tr class='trquery1' id="tr_reason" style="display:none">
    <td width='211'>不占用配额的原因:</td>
    <td width='619' align="left">
        <select name='sel_reason' id="sel_reason">
            <option value='0'>请选择</option>
            <%
				dim sql_sel_reason
                sql_sel_reason="SELECT id, reason FROM t_no_quota_reason_config where deleted=0"
                set rs_sel_reason=db.execute(sql_sel_reason)
                while not rs_sel_reason.eof
                    [color=red]
                    response.Write "<option value="&rs_sel_reason("id")&" >"&rs_sel_reason("reason")&"</option>"
                    [/color]                    
                    rs_sel_reason.movenext
                wend
                rs_sel_reason.close
            %>
        </select>
    </td>
</tr>



参考:http://www.codeproject.com/
  相关解决方案