Click to See Complete Forum and Search --> : Counting records
artsapimp
Jan 16th, 2001, 10:03 AM
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.
moose
Jan 16th, 2001, 10:24 AM
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;
artsapimp
Jan 16th, 2001, 10:40 AM
Thanks.
so it should look like this?
Dim intRecords
strSQL = "Select count(*) as intRecords FROM tblTable"
Is that right?
Does anyone know how to set the expiration on a page?
Kagey
Jan 16th, 2001, 04:05 PM
in asp you can do this i think:
<%
'put this before any page output
Response.buffer = true
Response.Expires = -1
Response.AddHeader "Pragma", "no-cache"
Response.AddHeader "cache-control", "no-store"
%>
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.
artsapimp
Jan 16th, 2001, 05:46 PM
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.
Kagey
Jan 17th, 2001, 04:47 PM
Your right Sadovod, it does refresh the page every 60 seconds, but it doesnt make the page expire.
artsapimp
Jan 17th, 2001, 04:47 PM
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.
artsapimp
Jan 18th, 2001, 09:13 AM
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.
Clunietp
Jan 18th, 2001, 09:28 AM
put this in your HTML <HEAD> section
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
artsapimp
Jan 18th, 2001, 10:18 AM
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.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.