1. How do I count the number of records in a recordset? I know it's easy, I just don't remember the strSQL. Thanks.
2. How do I make a page expire once it's been submitted?
Thanks.
Printable View
1. How do I count the number of records in a recordset? I know it's easy, I just don't remember the strSQL. Thanks.
2. How do I make a page expire once it's been submitted?
Thanks.
1. You can do something as simple as: count(*)in the query design grid in access or here is the SQL:
SELECT Count(*) AS Expr1
FROM your_table;
Thanks.
so it should look like this?
Is that right?Code:Dim intRecords
strSQL = "Select count(*) as intRecords FROM tblTable"
Does anyone know how to set the expiration on a page?
in asp you can do this i think:
i am absolutly positive there is a meta tag to set the expiration period and i have used it before so i should know, but of course i dont.Code:<%
'put this before any page output
Response.buffer = true
Response.Expires = -1
Response.AddHeader "Pragma", "no-cache"
Response.AddHeader "cache-control", "no-store"
%>
I tried it and it didn't work. Thanks for trying though.
<META HTTP-EQUIV="REFRESH" CONTENT=60>
I think this should refresh the page every minute.
Your right Sadovod, it does refresh the page every 60 seconds, but it doesnt make the page expire.
Yes it will. But what I need more than that is to make it no available any more. Does anyone know how to do that?
May I humbly suggest to place something like
onClick=" document.all.refreshMeta.httpEquiv='expires' ;
document.all.refreshMeta.content='-1' "
in your submit button, when user clicks it.
Thank you. I am not really good at javascript so I could also use a little help with the error I'm getting when trying it.
document.all.refreshMeta' is not an object
Thanks again for any help.
put this in your HTML <HEAD> section
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
Thanks again, but that didn't help either.
I'm assuming that one just stops it from being written to someone's cache right?
What I want to happen is have the page come up with a Timeout message instead of letting the person hitting the back button ever see that page again.