<%
startime=timer()
dim conn
dim connstr
dim db
db="数据库.mdb"
Set conn = Server.CreateObject("ADODB.Connection")
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(""&db&"")
conn.Open connstr
function CloseDatabase
Conn.close
Set conn = Nothing
End Function
%>
<% dim sql,rs
sql="Select top 10 dateantime,username,annouceid,potic,hits from usermd order by dateandtime desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%>
<%if rs.eof and rs.bof then
response.write "
没有找到符合条件的内容
"
else
%>
<%do while not rs.eof%><%rs=("username")%>
<% rs.movenext
loop
end if
rs.close
sql.close %>
提示是rs.open sql,conn,1,1行有错误如下:
Microsoft JET Database Engine 错误 '80040e10'
至少一个参数没有被指定值
rs.open sql,conn,1,3尝试过这样也还是如此