这段代码到底哪儿错了,怎么提不出数据呢?

来源:百度知道 编辑:UC知道 时间:2024/05/16 05:02:07
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"><%set rs=server.createobject("adodb.recordset")
rs.open "select * from dongtai order by id desc",conn,1,1
if rs.recordcount=0 then
%>
<table width="96%" border="0" cellspacing="0" cellpadding="0" align="right">
<tr>
<td align=center>暂无信息</td>
</tr>
</table>
<%else%>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<%i=0
do while not rs.eof%>
<tr>

这段代码本身没有问题,看看其他地方吧。

设置一下断点。比如
rs.open "select * from dongtai order by id desc",conn,1,1
改成
if err.number<>0 then response.write err.description : response.end