% @ language = "vbscript" %> <% dim cnn, rst, ssql set cnn = server.createobject("adodb.connection") set rst = server.createobject("adodb.recordset")
cnn.open "DSN=data;" sSQL = "SELECT * FROM board " rst.open sSQL,cnn %> <html><head> <title>dkjf</title></head> <body> <% while not rst.eof %> <% if rst("parentid") = 0 then %> <table class=tableborder1 width="80%" cellspacing=0 cellpadding=0 align=center> <tr> <td class=bgp> <% = rst("boardtype") %></td><td class=bgp></td><td class=bgp></td><td class=bgp></td><td class=bgp></td><td class=bgp></td> </tr> <% if rst("parentid") = rst("parentid-1") then %> <tr> <td width=1 class=bg></td> <td> <% = rst("xiaopic") %></td> <td width=1 class=bg></td> <td> <% = rst("boardtype") %><br><% = rst("show") %></td> <td> <% = rst("pic_path") %></td> <td>   主题:<% = rst("topic") %><br>   作者:<% = rst("author") %><br> 日期:<% = rst("date") %></td> </tr> <tr> <td></td><td class=bg2>版主:<% = rst("edition") %></td><td class=bg2></td><td class=bg2></td><td class=bg2></td> </tr> <% end if %> </table> <% end if %> <% wend %>
</body> </html>
上面这段代码,我运行的时候,速度非常慢,出错信息是“内存无法分配”之类的