"在对应所需名称或序数的集合中未找到项目" ,网上查下来好象都是数据库某个字段名字写错了或不存在之类的,但我的应该不是这方面的问题,
错误类型:
ADODB.Recordset (0x800A0CC1)
在对应所需名称或序数的集合中,未找到项目。
/blog/baojianpin/chanpin_list1.asp, 第 56 行
红色的是第 56 行
<!--#include file="conn.asp"-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
.style3 { color: #000000;
font-size: 9px;
}
.style4 {color: #000000}
-->
</style>
<style type="text/css">
<!--
body {
background-image:
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style>
<style type="text/css">
<!--
.style2 {font-size: 14px}
body,td,th {
color: #333333;
}
a:link {
color: #333333;
text-decoration: none;
}
a:visited {
color: #666666;
text-decoration: none;
}
a:active {
color: #FF3300;
text-decoration: none;
}
a:hover {
text-decoration: none;
color: #3399FF;
}
.STYLE5 {font-size: 12px}
.STYLE8 {font-size: 16px}
-->
</style>
</head>
<body>
<p>
<table align="center" width="500" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<%
set rs=server.createobject("adodb.recordset")
sql="select * from baojianpin where gongsi='"&rs("gongsi")&"' order by date DESC"
rs.open sql,conn,1,1
%>
<td align="left" valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="border">
<!--DWLayoutTable-->
<tr class="topbg">
<td height="48"><div align="left"></div>
<table width="499" height="100%" border="0" align="left" cellpadding="0" cellspacing="0">
<% if rs.eof then %>
<tr>
<td width="410" height="200"><div align="center" class="STYLE5"><font size="1">暂时没有产品!</font></div></td>
</tr>
<%
else
rs.pagesize=10
totalrecord=rs.recordcount
totalpages=rs.pagecount
maxpages=rs.pagesize
if thepage<1 then
thepage=1
end if
if thepage>totalpages then
thepage=totalpages
end if
if thepage=1 then
showContent
else
if (thepage-1)*maxpages<totalrecord then
rs.move (thepage-1)*maxpages
dim bookmark
bookmark=rs.bookmark
showContent
end if
end if
rs.close
end if
sub showContent
dim i
dim k
k=(totalrecord-maxpages*(thepage-1))+1
i=0
do while not (rs.eof or err)
k=k-1
%>
<tr>
<div align="left">
<td height="20" align="left" class="STYLE5">·<a href="baojianpinxx.asp?id=<%=rs("id")%>" target="_blank">
<%=left((rs.Fields.Item("chanpin").Value),10)%>
</a>
</td>
</div>
</tr>
<%
i=i+1
if i>=Maxpages then exit do
rs.Movenext
loop
end sub
%>
</table></td>
</tr>
<tr>
<td width="225" height="37"> </td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%
set rs=nothing
conn.close
set conn=nothing
%>
</p>