爱护动物的事例:谁会做一段ASP读数据库新记录代码阿?

来源:百度文库 编辑:高校问答 时间:2024/05/05 15:04:25
我在网站上下载了一个ASP新闻源码程序 他没有更新新闻的调试源码!希望大家能帮我弄一段出来!我想在其他页面上插上这断
<script src="article.asp?Sort=新闻类别&n=显示多少条新新闻"></script>
article.asp 是文件名称
以下是代码 能帮我改下连接数据的名称
我的数据库库下载地址 vod.gamedlw.com/123.mdb
我的QQ:304903626 如果大哥们可以帮助我,我可以送20Q币,给一个电影网半年黄金包月!谢谢拉!电影网是我的服务器!http://vod.gamedlw.com

javastr="<style>A.menu2{text-decoration: none;color:#000099;line-height: 25pt;font-size:9pt} A.menu2:hover {text-decoration: none;line-height: 25pt;font-size:9pt;color: #ffffff}A.menu2:visited {color:#FF66cFF;line-height: 25pt;font-size:9pt}</style>"
javastr=javastr+"<table width=\"100%\" border=\"0\">"
<!--#include file="conn.asp"-->
<%class_name=request("Sort")
n=request("n")
if class_name<> "" then
set rs=server.createobject("adodb.recordset")
sql="select top "&n&" id,class_name,class_id,title,fname,oktime,hits from article where class_name='"&class_name&"' order by id desc"
rs.open sql,conn,1,1
%>
<%
do while not rs.eof
%>
javastr=javastr+"<tr><td>"
javastr=javastr+"<font color=\"#000000\" size=\"2\">.</font><span style=\"font-size:9pt;line-height: 15pt\"><a href=\"html/<%=rs("class_id")%>/<%=rs("fname")%>\" target=\"_blank\" ><%=rs("title")%></a></span>"
javastr=javastr+"</td></tr>"
<%n=n-1
if n<1 then exit do
rs.movenext
loop
%>
<% if n<1 then %>
javastr=javastr+"</table><span style=\"font-size:9pt;line-height: 15pt\"><a href=\"more.asp?class_id=<%=rs("class_ID")%>\"> - 更多新闻</a></span>"
<% end if %>
<%rs.close
set rs=nothing
conn.close
set conn=nothing%>
document.write (javastr)
<%else%>
document.write ("对不起,暂时没有任何内容。")
<%end if%>