日期:2014-05-17  浏览次数:21266 次

好急,请帮忙
<%
response.buffer=true
strBkgrnd= "#A6B7C4 "
strCat=request.querystring( "Cat ")
strPageTitle= "Select   Category "
%>
<%
if   strCat <> " "   then
set   objRec=server.createobject( "adodb.recordset ")
strSQL= "select   distinct   SubCategory,ModelNo,serial   from   ProdInfo   where   Category= ' "   &   strCat   &   " '   or   Filename   LIKE   '%SubCat% '   order   by   SubCategory "
objRec.open   strSQL,   strDS1,   adOpenKeyset,   adLockReadOnly,   adCmdText
if   objRec.eof   then
else
varSubCat=objRec.getrows
intSubCatCount=ubound(varSubCat,2)
end   if
objRec.close
set   objRec=nothing
end   if
%>

<table   width= "754 "   border= "0 "   cellspacing= "0 "   cellpadding= "0 ">
<tr>
<td>

<table   border= "0 "   width= "100% "   cellspacing= "0 "   cellpadding= "0 "   id= "table1 ">

<tr> <td>   <table   border= "0 "   cellspacing= "0 "   cellpadding= "0 ">
<tr>

<td>
<%
x=6 '为每行显示的数量
set   objRec=server.createobject( "adodb.recordset ")
strSQL= "select   distinct   SubCategory,ModelNo,serial   from   ProdInfo   where   Category= ' "   &   strCat   &   " '   or   Filename   LIKE   '%SubCat% '   order   by   SubCategory "
objRec.open   strSQL,   strDS1,   adOpenKeyset,   adLockReadOnly,   adCmdText
do   while   not   objRec.eof
%>
<table   cellSpacing= '0 '   cellPadding= '0 '   width= '100% '   border= '0 '> <tbody> <tr>
<%
for   i_ls=1   to   x
if   objRec.eof   then
for   k=i_ls   to   x
%>
<td> </td> <td> </td>
<%
next
exit   for
end   if
%>

<td   vAlign= 'top '   width= '150 '>
<table   border= "0 "   cellpadding= "1 "   cellspacing= "1 ">
<tr>
<td   bgcolor= " <%=stdColor1%> "   align= "center "> <font   size= "1 "> <a   href= "Detail.asp?ModelNo= <%=varSubCat(1,0)%> "> <%=varSubCat(1,0)%> </a> </font>
</td>
</tr>
<tr>
<td   > <a   href= "Detail.asp?ModelNo= <%=varSubCat(1,0)%> "> <img   src= "../Images/ <%=varSubCat(1,0)%> _s.jpg "   border= "0 "   width= "75 "   height= "75 "   > </a>
</td>
</tr>
</table>   </td>

<%
objRec.movenext
next
%>
</tr>
</tbody> </table> <br>
<%
loop
objRec.close
%>


我的内容显示结果都是同一一张图片,名称也是通一个连接,请问该如何处理,急,该程序还应该如何减少系统资源消耗呢?请帮我修改下,谢谢