我想要显示新闻,3行5列,就是一行显示5条,共3行:
程序如下:
<%
set rs_links=server.createobject("adodb.recordset")
sqltext4="select top 15 * from links order by id desc"
rs_links.open sqltext4,conn,1,1
%><table width="100%" height="48" border="0" align="center" cellpadding="0" cellspacing="0">
<%i=0
do while not rs_links.eof%><tr>
<td height="12" align="left" valign="middle"><span class="style12"><a href="<%=rs_links("link")%>" title="<%=rs_links("note")%>"target="_blank"><%=rs_links("name")%></a></span></td>
<td align="left" valign="middle"> <%
rs_links.MoveNext i=i+1
if i=15 then exit do%><span class="style12"><a href="<%=rs_links("link")%>" title="<%=rs_links("note")%>"target="_blank"><%=rs_links("name")%></a></span></td>
<td align="left" valign="middle"><%
rs_links.MoveNext i=i+1
if i=15 then exit do%><span class="style12"><a href="<%=rs_links("link")%>" title="<%=rs_links("note")%>"target="_blank"><%=rs_links("name")%></a></span></td>
<td align="left" valign="middle"><%
rs_links.MoveNext i=i+1
if i=15 then exit do%><span class="style12"><a href="<%=rs_links("link")%>" title="<%=rs_links("note")%>"target="_blank"><%=rs_links("name")%></a></span></td>
<td align="left" valign="middle"><%
rs_links.MoveNext i=i+1
if i=15 then exit do%><span class="style12"><a href="<%=rs_links("link")%>" title="<%=rs_links("note")%>"target="_blank"><%=rs_links("name")%></a></span></td>
</tr>
<% rs_links.movenext
i=i+1
if i=15 then exit do
loop
rs_links.close %>
</table>
结果提示:
Microsoft VBScript 运行时错误 错误 '800a01c2'
错误的参数个数或无效的参数属性值: 'MoveNext'
/index1.asp,行 499
红字是行499
怎么解决?