for i=0 to 10
  //your code
next

解决方案 »

  1.   

    do while not rs.eof    //code..rs.movenext
    loop
      

  2.   

    response.write "<table border=0>"
    do while not rs.eof
     response.write "<tr><td>" & rs(0) & "</td></tr>"
    loop
    response.write "</table>"
    plus:好象你贴错了地方了哦;)如果你用的是asp.net那就根本不需要循环表格,直接用DataGrid等控件就可。
      

  3.   

    <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
     
    <!--#include file="conn.asp"-->
    <%set rs=server.CreateObject("adodb.recordset")(提示这个地方有错误 )
    sql="select * from user "
    %>
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    </head><body>
    <table width="75%" border="1">
      <tr> 
        <td>id</td>
        <td>username</td>
        <td>userpassword</td>
        <td>hit</td>
      </tr>
      
      <%
    if rs.eof then
    response.write("数据库中没有信息!")
    end if
    %>
    <%
    do while not rs.eof%>
       <tr>
        <td><%rs=""&id&""%></td>
        <td><%rs=""&username&""%></td>
        <td><%rs=""&userpassword&""%></td>
        <td><%rs=""&hit&""%></td>
    </tr>
    <%
    rs.next
    loop
    %>
      
    </table>
    </body>
    </html>
    大家帮我看看有什么错误的地方
      

  4.   

    <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
     
    <!--#include file="conn.asp"-->
    <%set rs=server.CreateObject("adodb.recordset")(提示这个地方有错误)
    sql="select * from user "
    %>
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    </head><body>
    <table width="75%" border="1">
      <tr> 
        <td>id</td>
        <td>username</td>
        <td>userpassword</td>
        <td>hit</td>
      </tr>
      
      <%
    if rs.eof then
    response.write("数据库中没有信息!")
    end if
    %>
    <%
    do while not rs.eof%>
       <tr>
        <td><%rs=""&id&""%></td>
        <td><%rs=""&username&""%></td>
        <td><%rs=""&userpassword&""%></td>
        <td><%rs=""&hit&""%></td>
    </tr>
    <%
    rs.next
    loop
    %>
      
    </table>
    </body>
    </html>
    大家帮我看看有什么错误
      

  5.   

    set rs=server.CreateObject("adodb.recordset")
    你的rs没有指定ActiveConnection
      

  6.   

    1.set rs=server.CreateObject("adodb.recordset")(提示这个地方有错误)
    如果有错误只能说明你的服务器上没有提供数据访问组件,可能你需要联系管理员添加,好象是DAO2.0以上
    2.需要打开数据库连接才能读取数据:rs.open sql,conn,其中conn是定义在你的conn.asp中的数据库连接对象。
    3.<%rs=""&id&""%>是不对的.这样写:<%=rs("id")%>
    4.rs.next也不对.这样写:rs.MoveNext
    5.最后最好要关闭数据库连接set conn=nothing