急切求助 ADODB.Field 错误 '80020009'
下面是代码<%Dim ipagecount
Dim ipagecurrent
Dim strorderBy
Dim irecordsshown
if request.querystring("page")="" then
ipagecurrent=1
else
ipagecurrent=cint(request.querystring("page"))
end if
sql="Select * from news where classid=2 order by newsid desc"
set rs=server.CreateObject("adodb.recordset")
if request("page")="" then
rs.pagesize = 8
rs.cachesize = 8
MaxPage=16
else
rs.pagesize = 12
rs.cachesize = 12
MaxPage=12
end if
rs.open sql,conn,1,1
ipagecount = rs.pagecount
If ipagecurrent > ipagecount Then ipagecurrent = ipagecount
If ipagecurrent < 1 Then ipagecurrent = 1
if ipagecount=0 then
response.write "<tr><td align='center'>没有任何图片</td></tr>"
else
rs.absolutepage = ipagecurrent
irecordsshown = 0
do while irecordsshown<MaxPage and NOT rs.EOF
%>
<tr>
<%for i=1 to 4%>
<td width='25%' height="155" align="center">
<table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20"> </td>
</tr>
</table>
<table width="137" height="210" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" bgcolor="363737"> <table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" bgcolor="313133">
<%if not rs.eof then
w=100:h=150
m=w/99:n=h/99
if w>=99 or h>=99 then
if m>n then
w1=99:h1=h/m
elseif m<n then
h1=99:w1=w/n
else
w1=99:h1=99
end if
else
w1=w:h1=h
end if%>
<a href="view.asp?newsid=<%=rs("newsid")%>" target="_blank"><img src="<%=rs("img")%>" width="100" height="150" border="0" class="link2"></a>
<%irecordsshown = irecordsshown +1
end if
%>
</td>
</tr>
</table>
<table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="file%3a///I|/%CD%F8%D5%BE%D4%B4%C2%EB/%B9%A4%D7%F7%CA%D2/flash/web/45.gif
访问网址超出本站范围,不能确定是否安全
继续访问 取消访问file:///I|/%CD%F8%D5%BE%D4%B4%C2%EB/%B9%A4%D7%F7%CA%D2/flash/web/45.gif" width="8" height="10"></td>
</tr>
</table>
<font color="#999999"><%=rs("title")%></font></td>
</tr>
</table>
<table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="file%3a///I|/%CD%F8%D5%BE%D4%B4%C2%EB/%B9%A4%D7%F7%CA%D2/flash/web/45.gif
访问网址超出本站范围,不能确定是否安全
继续访问 取消访问file:///I|/%CD%F8%D5%BE%D4%B4%C2%EB/%B9%A4%D7%F7%CA%D2/flash/web/45.gif" width="8" height="5"></td>
</tr>
</table></td>
<%rs.movenext%>
<%next%>
</tr>
<%loop%>
<tr>
<td height='35' colspan='4' align='center' valign="bottom" class="link"><table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25"> </td>
</tr>
</table>
每页显示 <%=MaxPage%> 组图片 第<font color="#FF0000"><%=ipagecurrent%></font>/<%=ipagecount%>页
<%if ipagecurrent=1 then
else
Response.Write"<a href='?page=1' class='red'>首页</a> | "
Response.Write"<a href='?page="&ipagecurrent-1&"' class='red'>上一页</a> | "
end if
if ipagecount>ipagecurrent then
Response.Write"<a href='?page="&ipagecurrent+1&"' class='red'>下一页</a> "
Response.Write"| <a href='?&page="&ipagecount&"' class='red'>末页</a> "
end if%>
<table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="18"> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="31" background="img/copyright_black.gif"> </td>
</tr>
</table></td>
</tr>
<%end if
rs.Close
set rs=nothing
%>