急,ASP问题

来源:百度知道 编辑:UC知道 时间:2024/06/15 18:52:28
<%
dim rs,sql,rsCate

set rsCate=server.createobject("adodb.recordset")
%>
<div align=center style="color: red; font-size: 30px; "><b>新闻系统</b></div>
<%
sql="select * from CATEGORY order by id"
set rsCate=conn.execute(sql)
do while not rsCate.eof
stitle=rsCate("CATENAME")
cid=rsCate("ID")
%>
<a href="#a<%=cid%>">
<font style="text-decoration: none; "><%=stitle%></font>
</a> |
<%
rsCate.movenext
loop
%>

<a style="text-decoration: none; " href="#">新闻查询</a>|
<a style="text-decoration: none; " href="#">新闻管理</a>

<%
if rsCate.bof=false then
rsCate.movefirst
end if

do while not rsCate.eof
stitle=rsCate("CATENAME&quo

是下面一段中rcount一直=0吗?
把strsql打印出来看看是否错误了
if rCount=0 then
Response.Write "<tr align='center'><td colspan=6><font color=red>对不起,目前还没有添加新闻!</font></td></tr>"
end if
=============================

什么意思?
数据库中有新闻纪录了
但是没显示出来还是没有添加成功?