Results 1 to 12 of 12

Thread: Counting records

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2000
    Posts
    323
    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.
    If you think education is expensive, try ignorance.

  2. #2
    Member
    Join Date
    Sep 2000
    Posts
    46
    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;

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2000
    Posts
    323
    Thanks.

    so it should look like this?

    Code:
    Dim intRecords
    strSQL = "Select count(*) as intRecords FROM tblTable"
    Is that right?

    Does anyone know how to set the expiration on a page?
    If you think education is expensive, try ignorance.

  4. #4
    Hyperactive Member Kagey's Avatar
    Join Date
    Sep 2000
    Location
    The Wilderness of New Brunswick
    Posts
    294
    in asp you can do this i think:
    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 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.

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2000
    Posts
    323
    I tried it and it didn't work. Thanks for trying though.
    If you think education is expensive, try ignorance.

  6. #6
    Guest
    <META HTTP-EQUIV="REFRESH" CONTENT=60>

    I think this should refresh the page every minute.

  7. #7
    Hyperactive Member Kagey's Avatar
    Join Date
    Sep 2000
    Location
    The Wilderness of New Brunswick
    Posts
    294
    Your right Sadovod, it does refresh the page every 60 seconds, but it doesnt make the page expire.

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2000
    Posts
    323
    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?
    If you think education is expensive, try ignorance.

  9. #9
    Guest
    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.

  10. #10

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2000
    Posts
    323
    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.
    If you think education is expensive, try ignorance.

  11. #11
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    put this in your HTML <HEAD> section

    <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">

  12. #12

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2000
    Posts
    323
    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.
    If you think education is expensive, try ignorance.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width