以下是连续读取五张图片;能否写成分五次读取,分别读取第一、第二、第三张图片,
<%
dim cn1,rs1
Set cn1=Server.CreateObject("ADODB.Connection")
Cn1.Open "Driver={SQL Server};Server=10.41.61.9;UID=sa;PWD=shuqiang;DATABASE=dtfb;Driver={SQL Server}"
set rs1=server.createobject("adodb.recordset")
str="select top 5 a.id,a.filename,b.filename,b.fileext from xctb a,xctbfile b where a.id=b.filesub and b.filefirst=1 and a.filestate=2 and a.filexs=1 order by a.filetime desc"
rs1.open str,cn1,1,1
if rs1.recordcount>0 then
For i =1 To 5
If Not rs1.Eof Then
%>
<table border="0" cellpadding="0" cellspacing="0" style="border:1px solid #5E54CF; " width="100%" bgcolor="#FFFFFF">
<tr> <td height="166" align="center" valign="top" onMouseMove="this.bgColor='#FCD41C'" onMouseOut="this.bgColor='#FF9900'">
<a href="xwy1/fbpage.asp?id=<% =rs1(0) %>" target="_blank"><img src="<% ="/xwy1/"+rs1(2)+"o"+rs1(3) %>" width="210" height="166" border="0"></a></td>
</tr>
</table>
<%
dim cn1,rs1
Set cn1=Server.CreateObject("ADODB.Connection")
Cn1.Open "Driver={SQL Server};Server=10.41.61.9;UID=sa;PWD=shuqiang;DATABASE=dtfb;Driver={SQL Server}"
set rs1=server.createobject("adodb.recordset")
str="select top 5 a.id,a.filename,b.filename,b.fileext from xctb a,xctbfile b where a.id=b.filesub and b.filefirst=1 and a.filestate=2 and a.filexs=1 order by a.filetime desc"
rs1.open str,cn1,1,1
if rs1.recordcount>0 then
For i =1 To 5
If Not rs1.Eof Then
%>
<table border="0" cellpadding="0" cellspacing="0" style="border:1px solid #5E54CF; " width="100%" bgcolor="#FFFFFF">
<tr> <td height="166" align="center" valign="top" onMouseMove="this.bgColor='#FCD41C'" onMouseOut="this.bgColor='#FF9900'">
<a href="xwy1/fbpage.asp?id=<% =rs1(0) %>" target="_blank"><img src="<% ="/xwy1/"+rs1(2)+"o"+rs1(3) %>" width="210" height="166" border="0"></a></td>
</tr>
</table>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货