Forum Moderators: open
Let me show you my code:
(login.asp file)
Else IF (RS("login") = "True") and (RS("logout") = "True") and DateDiff("d",RS("logindate"),date)>0 then
conn.Execute ("UPDATE history SET timetoday= 0 WHERE patronID='" & idnum & "'")
Server.Transfer "login2.asp"
When the login2.asp page opens up response.write rs("timetoday") shows the value before the script on login.asp is run. If you open the history table in access the value of timetoday is 0. Once login2.asp is refreshed then the value of timetoday is shown as 0.
Here is the display code in login2.asp:
<%
if rs.eof then
' There is no record to match the PatronID
%>
<TR>
<td><strong>Total Time Today: 0 minute(s)</strong></td>
</TR>
<%
Else
%>
<TR>
<td><strong>Total Time Today: <% Response.Write today %> minute(s)</strong></td>
</TR>
<%
END IF
%>
Any ideas on how to get what is actulally in the database to display on the screen withought manually refreshing the screen?
Thank you for your time,
Kyle
you'll need to pop your recordset again if you want the new value.
currently it looks like this:
populate dataset
change db value
read dataset value
you'll need to change it to requery for the new value
populate dataset
change db value
repopulate dataset
read dataset value
this should be what you want.
-Mark