主题:[原创]在对应所需名称或序数的集合中,未找到项目。
我想逐个显示数据表中的图片,主体代码以下:
...
<body bgcolor="#9CC7EF" text="#000000" leftmargin="0" topmargin="3">
<table width="98%" border="1" bordercolordark=#9CC7EF bordercolorlight=#145AA0 cellspacing="0" cellpadding="4" align="center">
<tr>
<td height="26" bgcolor="#74B0ED">
<div align="center"><font color="#FFFFFF">浏览图片</font></div>
</td>
</tr>
<%
dim sql3,rs3,style_no
style_no=trim(Request.QueryString("style_no"))
sql3="select * from bigimg where style_no='"&style_no&"'"
set rs3=server.createobject("adodb.recordset")
rs3.open sql3,conn,1,1
if not rs3.eof then
dim i
for i=2 to rs3.fields.count
if rs3(i)="nothing" then '第 25 行
response.Write "该款号暂无图片显示!"
else%>
<tr align="center">
<td><img src="../bigimg/<%=rs3(i)%>"></td>
<td>图片名称:<%=rs3(i)%> <input type="button" name="Submit1" value="删除该图片" onClick="window.location='delimglist.asp?style_no=<%=rs3("style_no")%>&rsi=<%=rs3(i).name%>'"></td>
</tr>
<%
end if
next
else
response.Write "没有该款产品记录"
end if
%>
<tr align="center">
<td>
<input type="button" name="Submit4" value="关闭该窗口" onClick="Javascript:window.close()">
</td>
</tr>
</table>
<%
rs3.close
set rs3=nothing
conn.close
set conn=nothing
%>
</body>
</html>
错误信息:
错误类型:
ADODB.Recordset (0x800A0CC1)
在对应所需名称或序数的集合中,未找到项目。
bigimgview.asp, 第 25 行。
bigimg表的字段有id,style_no,img1,img2,img3,img4,img5,...,img20 ,我想通过rs3(i)将img字段中的图片输出。 不知道哪里有问题。请大家看看。谢谢了。
...
<body bgcolor="#9CC7EF" text="#000000" leftmargin="0" topmargin="3">
<table width="98%" border="1" bordercolordark=#9CC7EF bordercolorlight=#145AA0 cellspacing="0" cellpadding="4" align="center">
<tr>
<td height="26" bgcolor="#74B0ED">
<div align="center"><font color="#FFFFFF">浏览图片</font></div>
</td>
</tr>
<%
dim sql3,rs3,style_no
style_no=trim(Request.QueryString("style_no"))
sql3="select * from bigimg where style_no='"&style_no&"'"
set rs3=server.createobject("adodb.recordset")
rs3.open sql3,conn,1,1
if not rs3.eof then
dim i
for i=2 to rs3.fields.count
if rs3(i)="nothing" then '第 25 行
response.Write "该款号暂无图片显示!"
else%>
<tr align="center">
<td><img src="../bigimg/<%=rs3(i)%>"></td>
<td>图片名称:<%=rs3(i)%> <input type="button" name="Submit1" value="删除该图片" onClick="window.location='delimglist.asp?style_no=<%=rs3("style_no")%>&rsi=<%=rs3(i).name%>'"></td>
</tr>
<%
end if
next
else
response.Write "没有该款产品记录"
end if
%>
<tr align="center">
<td>
<input type="button" name="Submit4" value="关闭该窗口" onClick="Javascript:window.close()">
</td>
</tr>
</table>
<%
rs3.close
set rs3=nothing
conn.close
set conn=nothing
%>
</body>
</html>
错误信息:
错误类型:
ADODB.Recordset (0x800A0CC1)
在对应所需名称或序数的集合中,未找到项目。
bigimgview.asp, 第 25 行。
bigimg表的字段有id,style_no,img1,img2,img3,img4,img5,...,img20 ,我想通过rs3(i)将img字段中的图片输出。 不知道哪里有问题。请大家看看。谢谢了。