日期:2014-05-16  浏览次数:20789 次

这么简单的程序,都不好意思发帖请教
本来是想根据大类ID找小类,可是抓不到数据。

后来索性直接不加条件来显示小类table,谁知,还真是抓不到数据,真是奇怪麻烦大家伙帮看看

1,小类表“smallclass”里面的数据:


2,抓数据的SQL语句:

  <table border="1" width="100%" cellspacing="0" cellpadding="0" class='tableBorder tableBorder-thcenter'>
    <tr><th width="5%"></th>
<th width="10%">类id</th>
<th width="20%">类名称</th>
<th width="20%">类描述</th>
<th width="45%">操作</th>
</tr>

<%
'根据classid来关联smallclass小类表,取得相应的小类数据
      set rs1=server.CreateObject("adodb.recordset")
      rs1.open "Select * From smallClass",conn,1,1
        do while not rs1.eof
%>
            <tr bgcolor="#E3E3E3><td> - </td>
                <td><%=rs1("smallclassid")%></td>
                <td><%=rs1("smallclassname")%></td>
                <td><%=rs1("dscr")%></td>
                <td align="center"></td>
            </tr>
<%
        rs1.movenext
        loop
 
      call rs1close


call connclose()
%>
  </table>


3,网页显示结果:(数据区为空白)


注意:本程序里面on erro resme next那句已经注释掉,只要有逻辑方面的错误,都会抛出错误,现在页面是没报任何错误。
------解决方案--------------------
<tr bgcolor="#E3E3E3"><td> - </td>

这里少了",可能是属性未闭合导致浏览器绘制表格失败,自己检查下客户端html代码生成了没有