很简单的问题,希望大家能帮忙..
运行后出错:
错误类型:
ADODB.Recordset (0x800A0CC1)
在对应所需名称或序数的集合中,未找到项目。
/list/list.asp, 第 14 行
源码如下:请大家指出问题,谢谢!
<!--#include file= "conn.asp "-->
<%
set rs=server.createobject( "adodb.recordset ")
sql= "select * from top "
%>
<table width= "200 " border= "1 " align= "center " cellpadding= "0 " cellspacing= "0 ">
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> <%=rs( "name ")%> </td>
<td> </td>
</tr>
</table>
------解决方案-------------------- <td> <%=rs( "name ")%> </td>
想这样啊
数据库的表里有什么字段...你想显示的可以和上面这句类似
比如有address字段 那就 <%=rs( "address ")%>
------解决方案-------------------- <!--#include file= "conn.asp "-->
<%
set rs=server.createobject( "adodb.recordset ")
sql = "select * from [top] order by id desc " '因为top在SQL语法里是关键字
rs.open sql,conn,3,1 '记录集打开
do while not rs.eof
%>
<table width= "200 " border= "1 " align= "center " cellpadding= "0 " cellspacing= "0 ">
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> <%=rs( "name ")%> </td>
<td> </td>
</tr>
<%
rs.movenext
loop
%>
</table>
<% rs.close '记录集关闭
set rs=nothing '释放对象
%>