Automatically remove record?

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default Automatically remove record?

    Can anyone tell me if its possible to automatically remove (not delete) a
    record from database after a certain date has passed?
    I want to use a feature like this to stop clients advertisements being shown
    on a results page after a renewal date has passed
    Many thanks
    Gary


    woodywyatt Guest

  2. Similar Questions and Discussions

    1. Deleteing a record from mySQL automatically with a specified date.
      Hi, I have a script that pulls data from a mySQL db in the form of a Job listing front end. I would like to know how to automatically delete a...
    2. Automatically adding date/time stamp to an edited record
      To record just the date/time the record was created: Add a new Date/Time field to your table, and set its Default Value property to: =Now() To...
    3. Stop adding record in subform after record count = 1
      Can someone help in in what to put after the THEN statment to allow one entry if the Record count is =>1 in the Before insert or should I set the...
    4. how to remove a programe from the add/remove list manually
      i am using winXP home, i just remove a programe from the start menu(start>>all programes>>name of the programe>>uninstall),but the programe name is...
    5. create record (in subform) automatically
      Hi all I'm beginning to think in the wrong way, so I need help. In an Access 2000 database I have two (very) related tables, Invoices and Amount...
  3. #2

    Default Re: Automatically remove record?

    Yes, depending on the database server you are using... you could use
    triggers, but probably the best way would be to modify your query for the
    ads so that it only shows ads that aren't past their renewal date, here is
    an example,

    SELECT *
    FROM Ads
    WHERE AdRenewDate > GetDate()

    The above code will work with SQL Server, not sure about other database
    systems...

    HTH,
    Drew


    "woodywyatt" <woodywyatt@fuerteventura.com> wrote in message
    news:d365hh$6ei$1@forums.macromedia.com...
    > Can anyone tell me if its possible to automatically remove (not delete) a
    > record from database after a certain date has passed?
    > I want to use a feature like this to stop clients advertisements being
    > shown
    > on a results page after a renewal date has passed
    > Many thanks
    > Gary
    >
    >

    Drew Guest

  4. #3

    Default Re: Automatically remove record?

    I think I've got myself even more confused here.
    Okay, I'll explain what I need to do..
    I have a form where users can fill in their details and upload an image to a
    database to be displayed as an advertisement. I would also like to somehow
    insert today's date from this form at the same time. Then after one year,
    from this date automatically remove (not delete) the record from database.
    Can you point me in the right direction?
    I'm using ASP running on Access (DSN connection)
    Thanks
    Gary

    Thanks
    "Drew" <drew.laing@NOswvtc.dmhmrsas.virginia.SPMgov> wrote in message
    news:d369oq$cuk$1@forums.macromedia.com...
    > Yes, depending on the database server you are using... you could use
    > triggers, but probably the best way would be to modify your query for the
    > ads so that it only shows ads that aren't past their renewal date, here is
    > an example,
    >
    > SELECT *
    > FROM Ads
    > WHERE AdRenewDate > GetDate()
    >
    > The above code will work with SQL Server, not sure about other database
    > systems...
    >
    > HTH,
    > Drew
    >
    >
    > "woodywyatt" <woodywyatt@fuerteventura.com> wrote in message
    > news:d365hh$6ei$1@forums.macromedia.com...
    > > Can anyone tell me if its possible to automatically remove (not delete)
    a
    > > record from database after a certain date has passed?
    > > I want to use a feature like this to stop clients advertisements being
    > > shown
    > > on a results page after a renewal date has passed
    > > Many thanks
    > > Gary
    > >
    > >
    >
    >

    woodywyatt Guest

  5. #4

    Default Re: Automatically remove record?

    Remove and delete are the same thing. To only show records less than a year
    old, then do what the last post told you to, filter by date where dateField
    >= DateAdd("yyyy",-1,Date())
    --
    -------------------------------------------------------------------
    You must SHOW YOURSELF to e-mail me. No cowards allowed!




    "woodywyatt" <woodywyatt@fuerteventura.com> wrote in message
    news:d36qn0$6mt$1@forums.macromedia.com...
    > I think I've got myself even more confused here.
    > Okay, I'll explain what I need to do..
    > I have a form where users can fill in their details and upload an image to
    a
    > database to be displayed as an advertisement. I would also like to somehow
    > insert today's date from this form at the same time. Then after one year,
    > from this date automatically remove (not delete) the record from database.
    > Can you point me in the right direction?
    > I'm using ASP running on Access (DSN connection)
    > Thanks
    > Gary
    >
    > Thanks
    > "Drew" <drew.laing@NOswvtc.dmhmrsas.virginia.SPMgov> wrote in message
    > news:d369oq$cuk$1@forums.macromedia.com...
    > > Yes, depending on the database server you are using... you could use
    > > triggers, but probably the best way would be to modify your query for
    the
    > > ads so that it only shows ads that aren't past their renewal date, here
    is
    > > an example,
    > >
    > > SELECT *
    > > FROM Ads
    > > WHERE AdRenewDate > GetDate()
    > >
    > > The above code will work with SQL Server, not sure about other database
    > > systems...
    > >
    > > HTH,
    > > Drew
    > >
    > >
    > > "woodywyatt" <woodywyatt@fuerteventura.com> wrote in message
    > > news:d365hh$6ei$1@forums.macromedia.com...
    > > > Can anyone tell me if its possible to automatically remove (not
    delete)
    > a
    > > > record from database after a certain date has passed?
    > > > I want to use a feature like this to stop clients advertisements being
    > > > shown
    > > > on a results page after a renewal date has passed
    > > > Many thanks
    > > > Gary
    > > >
    > > >
    > >
    > >
    >
    >

    Lionstone Guest

  6. #5

    Default Re: Automatically remove record?

    Thanks for the swift reply
    Excuse my ignorance but can you clarify what the correct SQL would be?
    I've tried using this -
    SELECT *
    FROM upload
    WHERE Date >= 'DateAdd("yyyy",-1,Date())'
    But this doesn't seem to work.
    Do I need to enter anything in the variables fields?


    "Lionstone" <HIDELionstoneHIDE@HIDEhush.com> wrote in message
    news:d36u40$b3k$1@forums.macromedia.com...
    > Remove and delete are the same thing. To only show records less than a
    year
    > old, then do what the last post told you to, filter by date where
    dateField
    > >= DateAdd("yyyy",-1,Date())
    > --
    > -------------------------------------------------------------------
    > You must SHOW YOURSELF to e-mail me. No cowards allowed!
    >
    >
    >
    >
    > "woodywyatt" <woodywyatt@fuerteventura.com> wrote in message
    > news:d36qn0$6mt$1@forums.macromedia.com...
    > > I think I've got myself even more confused here.
    > > Okay, I'll explain what I need to do..
    > > I have a form where users can fill in their details and upload an image
    to
    > a
    > > database to be displayed as an advertisement. I would also like to
    somehow
    > > insert today's date from this form at the same time. Then after one
    year,
    > > from this date automatically remove (not delete) the record from
    database.
    > > Can you point me in the right direction?
    > > I'm using ASP running on Access (DSN connection)
    > > Thanks
    > > Gary
    > >
    > > Thanks
    > > "Drew" <drew.laing@NOswvtc.dmhmrsas.virginia.SPMgov> wrote in message
    > > news:d369oq$cuk$1@forums.macromedia.com...
    > > > Yes, depending on the database server you are using... you could use
    > > > triggers, but probably the best way would be to modify your query for
    > the
    > > > ads so that it only shows ads that aren't past their renewal date,
    here
    > is
    > > > an example,
    > > >
    > > > SELECT *
    > > > FROM Ads
    > > > WHERE AdRenewDate > GetDate()
    > > >
    > > > The above code will work with SQL Server, not sure about other
    database
    > > > systems...
    > > >
    > > > HTH,
    > > > Drew
    > > >
    > > >
    > > > "woodywyatt" <woodywyatt@fuerteventura.com> wrote in message
    > > > news:d365hh$6ei$1@forums.macromedia.com...
    > > > > Can anyone tell me if its possible to automatically remove (not
    > delete)
    > > a
    > > > > record from database after a certain date has passed?
    > > > > I want to use a feature like this to stop clients advertisements
    being
    > > > > shown
    > > > > on a results page after a renewal date has passed
    > > > > Many thanks
    > > > > Gary
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >
    >

    woodywyatt Guest

  7. #6

    Default Re: Automatically remove record?

    No quotes around the DateAdd function.

    --
    -------------------------------------------------------------------
    You must SHOW YOURSELF to e-mail me. No cowards allowed!




    "woodywyatt" <woodywyatt@fuerteventura.com> wrote in message
    news:d36vpv$d68$1@forums.macromedia.com...
    > Thanks for the swift reply
    > Excuse my ignorance but can you clarify what the correct SQL would be?
    > I've tried using this -
    > SELECT *
    > FROM upload
    > WHERE Date >= 'DateAdd("yyyy",-1,Date())'
    > But this doesn't seem to work.
    > Do I need to enter anything in the variables fields?
    >
    >
    > "Lionstone" <HIDELionstoneHIDE@HIDEhush.com> wrote in message
    > news:d36u40$b3k$1@forums.macromedia.com...
    > > Remove and delete are the same thing. To only show records less than a
    > year
    > > old, then do what the last post told you to, filter by date where
    > dateField
    > > >= DateAdd("yyyy",-1,Date())
    > > --
    > > -------------------------------------------------------------------
    > > You must SHOW YOURSELF to e-mail me. No cowards allowed!
    > >
    > >
    > >
    > >
    > > "woodywyatt" <woodywyatt@fuerteventura.com> wrote in message
    > > news:d36qn0$6mt$1@forums.macromedia.com...
    > > > I think I've got myself even more confused here.
    > > > Okay, I'll explain what I need to do..
    > > > I have a form where users can fill in their details and upload an
    image
    > to
    > > a
    > > > database to be displayed as an advertisement. I would also like to
    > somehow
    > > > insert today's date from this form at the same time. Then after one
    > year,
    > > > from this date automatically remove (not delete) the record from
    > database.
    > > > Can you point me in the right direction?
    > > > I'm using ASP running on Access (DSN connection)
    > > > Thanks
    > > > Gary
    > > >
    > > > Thanks
    > > > "Drew" <drew.laing@NOswvtc.dmhmrsas.virginia.SPMgov> wrote in message
    > > > news:d369oq$cuk$1@forums.macromedia.com...
    > > > > Yes, depending on the database server you are using... you could use
    > > > > triggers, but probably the best way would be to modify your query
    for
    > > the
    > > > > ads so that it only shows ads that aren't past their renewal date,
    > here
    > > is
    > > > > an example,
    > > > >
    > > > > SELECT *
    > > > > FROM Ads
    > > > > WHERE AdRenewDate > GetDate()
    > > > >
    > > > > The above code will work with SQL Server, not sure about other
    > database
    > > > > systems...
    > > > >
    > > > > HTH,
    > > > > Drew
    > > > >
    > > > >
    > > > > "woodywyatt" <woodywyatt@fuerteventura.com> wrote in message
    > > > > news:d365hh$6ei$1@forums.macromedia.com...
    > > > > > Can anyone tell me if its possible to automatically remove (not
    > > delete)
    > > > a
    > > > > > record from database after a certain date has passed?
    > > > > > I want to use a feature like this to stop clients advertisements
    > being
    > > > > > shown
    > > > > > on a results page after a renewal date has passed
    > > > > > Many thanks
    > > > > > Gary
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >
    >

    Lionstone 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