[求助] 显示基数个记录就出现错误,偶数个正常,如何解决,显示两行四列???
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Connections/bbsbak.asp" -->
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = "dsn=SQL Server;uid=sa;pwd=123456789;"
Recordset1.Source = "SELECT * FROM dbo.bxdlr"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = 4
Repeat1__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>保险代理人</title>
</head>
<body background="images/bg.gif" link="#000000" vlink="#000000" alink="#000000" marginheight="0">
<TABLE WIDTH=780 BORDER=0 align="center" CELLPADDING=0 CELLSPACING=0>
<TR>
<TD rowspan="6" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
%>
<td><table width="97%" height="179" border="0" align="center" cellpadding="0" cellspacing="0">
<%
do while not Recordset1.eof
%> <tr>
<td height="129"> <div align="center"><a href="<%=(Recordset1.Fields.Item("mb").Value)%>?userid=<%=(Recordset1.Fields.Item("userid").Value)%>" target="_blank"><img src="<%=(Recordset1.Fields.Item("userphoto").Value)%>" alt="userphoto" width="82" height="104" border="1"></a></div></td>
</tr>
<tr>
<td height="25" align="left" valign="middle"> <div align="center"><%=(Recordset1.Fields.Item("nicheng").Value)%></div></td>
</tr>
<tr>
<td height="25" align="left" valign="middle"> <div align="center">人气指数<%=(Recordset1.Fields.Item("click").Value)%></div></td>
</tr>
<%
i=i+1
if (i mod 2=0) then
exit do
response.write "<tr><td> </td></tr>"
end if
Recordset1.movenext
loop
%>
</table></td>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset1.MoveNext()
Wend
%>
</tr>
</table></td>
</tr>
</table></TD>
</TR>
</TABLE>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>