用ASP页面显示数据库中记录时,为什么后增加的记录,要刷新后才能显出来?
显示页面的代码如下:
<html>
<head><title>viewdatabase</title>
</head>
<body>
<%
dim con,rs,sqlstr
set con=server.createobject("adodb.connection")
con.open "provider=Microsoft.jet.oledb.4.0;data source="&server.mappath("data/data.mdb")
sqlstr="select * from user_info order by time desc"
set rs = con.execute(sqlstr)
%>
<table style="border:1px solid #ffeecc">
<tr><td>id</td><td>name</td><td>pwd</td><td>time</td><tr>
<%
do while not rs.eof
%>
<tr><td><%=rs("id")%></td>
<td><%=rs("name")%></td>
<td><%=rs("pwd")%></td>
<td><%=rs("time")%></td>
</tr>
<% rs.movenext
loop
%>
</table>
</body>
</html>