<% set con=server.CreateObject("ADODB.CONNECTION") Dbpath=server.MapPath("../Access_pevirc/mdb_perec_eec_xjtu.mdb") con.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Dbpath set RSobj=server.CreateObject("ADODB.Recordset") sql="Select * from 消息 order by ID DESC" RSobj.open sql,con,3,3 RSobj.MoveFirst %> Latest News <% for i=0 to 4 if not RSobj.eof then %> <% RSobj.MoveNext end if next %>
<% =RSobj("标题") %>
详细内容
<% RSobj.close set RSobj=nothing con.close set con=nothing %>