做了个数据列表,明明有记录,可是在页面中没有显示
if founderr thencall diserror()
response.End
end if
sql="select * from newwys where news_id="&cint(request.Form("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs.delete
rs.close
set rs=nothing
sql="update allcount set newscount = newscount - 1"
conn.execute(sql)
response.redirect "admin_news.asp"
end if
end if
dim totalnews,Currentpage,totalpages,i
sql="select * from newwys order by news_id DESC"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%>
<HTML><HEAD><TITLE>管理中心</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="inc/admin.css" type=text/css rel=StyleSheet>
<META content="MSHTML 6.00.2800.1126" name=GENERATOR>
</HEAD>
<body onkeydown=return(!(event.keyCode==78&&event.ctrlKey)) >
<%if request.QueryString("action")="" then%>
<table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=zonelovebk style="border-collapse: collapse">
<img src="tupian/lingdao5.gif">
</table>
<br>
<table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=lanyubk style="border-collapse: collapse">
<tr class=lanyuss>
<td colspan="4">校内新闻管理</td>
</tr>
<tr class=lanyuqs align="center">
<td width="50">编号</td>
<td width="*">标题</td>
<td width="150">时间</td>
<td width="100">操作</td>
</tr>
<%if not rs.eof then
rs.Movefirst
rs.pagesize=adperpage
if trim(request("page"))<>"" then
currentpage=clng(request("page"))
if currentpage>rs.pagecount then
currentpage=rs.pagecount
end if
else
currentpage=1
end if
totaldiary=rs.recordcount
if currentpage<>1 then
if(currentpage-1)*adperpage<totaldiary then
rs.move(currentpage-1)*adperpage
dim bookmark
bookmark=rs.bookmark
end if
end if
if (totaldiary mod adperpage)=0 then
totalpages=totaldiary\adperpage
else
totalpages=totaldiary\adperpage+1
end if
i=0
do while not rs.eof and i<adperpage
%>
<tr class=lanyuds>
<td align="center"><%=rs("news_id")%> </td>
<td><%=cutstr(formatstr(rs("news_title")),20,false,none)%></td>
<td align="center"><%=rs("news_date")%></td>
<td align="center"><a href="admin_news.asp?id=<%=rs("news_id")%>&action=editnews#editnews">编辑</a>
<a href="admin_news.asp?id=<%=rs("news_id")%>&action=delnews#delnews">删除</a></td>
</tr>
<%i=i+1
rs.movenext
loop
else
If rs.EOF And rs.BOF Then%>
<tr class=lanyuds>
<td colspan=4 align="center">当前还没有新闻!</td>
</tr>
<%end if
end if%>
<form name="form2" method="post" action="admin_news.asp">
<tr class=lanyuqs>
<td colspan=4 align="right"><%=currentpage%>/<%=totalpages%>页,<%=totaldiary%>条记录/<%=adperpage%>篇每页.
<%
i=1
dy10=false
showye=totalpages
if showye>10 then
dy10=true
showye=10
end if
for i=1 to showye
if i=currentpage then
%>
<%=i%>
<%else%>
<a href="admin_news.asp?page=<%=i%>"><%=i%></a>
<%end if
next
if totalpages>currentpage then
if request("page")="" then
page=1
else
page=request("page")+1
end if%>
<a href="admin_news.asp?page=<%=page%>" title="下一页">>></a>
<%end if%>
</td>
</tr>
</form>
</table>
<%end if
明明数据库中有4条记录,可是为什么显示不出来,但是page中有显示,显示了4条记录。高手帮忙看看~~