%
dim conn
dim connstr
dim db
db=server.mappath("News")+"\_Database\news.mdb"
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & db
'如果你的服务器采用较老版本Access驱动,请用下面连接方法
'connstr="driver={Microsoft Access Driver (*.mdb)};dbq=" & db
set conn=server.createobject("ADODB.CONNECTION")
conn.open connstr
function changetime(str)
if isNULL(str) then
changetime=""
exit function
end if
dim mytime
mytime=month(str)&"/"&day(str)&"/"&year(str)
changetime=mytime
end function
%>
<%
id=trim(request("newsort"))
if id="" then
id=5
'response.write "aaaaaaaaaa"
end if
sqlstr1="select * from t_news_purpose where newsort="&id&" order by id desc"
set myrs1=server.CreateObject("adodb.recordset")
myrs1.Open sqlstr1,conn,1,1
do while not myrs1.eof%>