Automatic deletion of records

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Automatic deletion of records

    I have set up a WebSite with user submitted news items and discussion
    groups, fed by an Access database.

    I need to find a way to automatically delete news items and discussion
    items - ie table records - on a regular basis in order to keep the
    ..mdb size down and news and discussion items recent.

    I could of course use a GLOBAL.ASA session start script which compares
    table record STAMP dates with the current DATE on say the 15th of each
    month, deleting whichever records are older than say 3 months.

    However, this would mean that the tables are checked on every session
    start for that day of the month. The WebSite will be receiving a large
    number of visitors and I don't want the script to have to run 500
    times!! Who knows what that would do to the DB integrity!!??

    Is there any way I can set the script to run just once a month without
    it having to be triggered by a new session??

    Thanks for any useful ideas.
    Richard Guest

  2. Similar Questions and Discussions

    1. PREVENTING CSS DELETION
      Hello, There is an option at the bottom of the CSS style list in Contribute, to remane or delete CSS styles. How do I configure Contribute to...
    2. More help with DB deletion
      3 pages. Input of primary keys on page 1. checking to make sure primary keys match, and display data to be deleted on page 2. Deletion of data...
    3. Help with database deletion
      we have the below 3 pages. delete_roster1, 2, 3.cfm from delete1 we have the user input two id fields, they are assigned to 2 different...
    4. Bookmarks deletion
      using Adobe Acrobat 5.0 on windows pc I am new to creating pdfs however, I created a 39 page pdf with several bookmarks. I need to update this...
    5. Deletion problems
      I am having two similar issues, and if I can figure one out, I might be able to figure out the other. a while back, I had a file that I couldn't...
  3. #2

    Default Re: Automatic deletion of records

    Richard wrote:
    > I have set up a WebSite with user submitted news items and discussion
    > groups, fed by an Access database.
    >
    > I need to find a way to automatically delete news items and discussion
    > items - ie table records - on a regular basis in order to keep the
    > .mdb size down and news and discussion items recent.
    >
    [url]http://www.aspfaq.com/show.asp?id=2143[/url]

    HTH,
    Bob Barrows

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"


    Bob Barrows Guest

  4. #3

    Default Re: Automatic deletion of records


    "Richard" <richardtinkler@yahoo.com> wrote in message
    news:be39f0a3.0311011414.29eeec62@posting.google.c om...
    > I have set up a WebSite with user submitted news items and discussion
    > groups, fed by an Access database.
    >
    > I need to find a way to automatically delete news items and discussion
    > items - ie table records - on a regular basis in order to keep the
    > .mdb size down and news and discussion items recent.
    >
    > I could of course use a GLOBAL.ASA session start script which compares
    > table record STAMP dates with the current DATE on say the 15th of each
    > month, deleting whichever records are older than say 3 months.
    >
    > However, this would mean that the tables are checked on every session
    > start for that day of the month. The WebSite will be receiving a large
    > number of visitors and I don't want the script to have to run 500
    > times!! Who knows what that would do to the DB integrity!!??
    >
    > Is there any way I can set the script to run just once a month without
    > it having to be triggered by a new session??
    >
    > Thanks for any useful ideas.

    what about this

    if Application("theLastDate") <> day(date) then
    DO SOMTHING
    Application("theLastDate") = day(date)
    end if


    this way it can not be done kmore than once in a day unless you restart the
    app.

    PS

    Application variables last the life of the application (until you reboot the
    web server)

    Session variables last as long as the users Session


    Mosley Jones III Guest

  5. #4

    Default Re: Automatic deletion of records

    On 1 Nov 2003 14:14:17 -0800, [email]richardtinkler@yahoo.com[/email] (Richard)
    wrote:
    >I have set up a WebSite with user submitted news items and discussion
    >groups, fed by an Access database.
    >
    >I need to find a way to automatically delete news items and discussion
    >items - ie table records - on a regular basis in order to keep the
    >.mdb size down and news and discussion items recent.
    >
    >I could of course use a GLOBAL.ASA session start script which compares
    >table record STAMP dates with the current DATE on say the 15th of each
    >month, deleting whichever records are older than say 3 months.
    >
    >However, this would mean that the tables are checked on every session
    >start for that day of the month. The WebSite will be receiving a large
    >number of visitors and I don't want the script to have to run 500
    >times!! Who knows what that would do to the DB integrity!!??
    >
    >Is there any way I can set the script to run just once a month without
    >it having to be triggered by a new session??
    Run it as a scheduled task, in VBS. Heck, this is Access, you could
    create a macro that did what you wanted and schedule that.

    Jeff
    Jeff Cochran Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139