468,101 Members | 1,344 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,101 developers. It's quick & easy.

automatic delete of out of date entries

IIS, Access 2000
I have a page that tabulates data from a DB, this data is items for sale,
private ads.

is there a way that at the same time it can automatically delete entries
that are outside of a specific date..ie. more than a week old??

or should I run two queries seperately..one page which goes through the DB
and deletes out of date entries and then redirects to another page which
then outputs the remaining ones.

I don't really want to have to run an admin script every day to delete the
entries, I would prefer it to be done automatically when the data is
requested. This way the data presented is guaranteed to be up to date as the
deletion is carried out immediately prior to the data being served.

Another question to follow along side this one but under the same sort of
conditions...

I have the ability to upload pictures to these ads, but I have previously
had to do this on a seperate page to that of entering the information for
the ad itself.

What I wish to do is have the picture upload (pureASPupload) and the data
entry to the database carrried out at the same time on the same page.

how would I go about doing this?

how do I get one submit button to both upload the file *and* update the DB
at the same time.

many thanks
Jul 19 '05 #1
4 2543
Alistair wrote:
IIS, Access 2000
I have a page that tabulates data from a DB, this data is items for
sale, private ads.

is there a way that at the same time it can automatically delete
entries that are outside of a specific date..ie. more than a week
old??

or should I run two queries seperately..one page which goes through
the DB and deletes out of date entries and then redirects to another
page which then outputs the remaining ones.
I don't really want to have to run an admin script every day to
delete the entries, I would prefer it to be done automatically when
the data is requested. This way the data presented is guaranteed to
be up to date as the deletion is carried out immediately prior to the
data being served.
Why do they need to be deleted? Why not simply request records that are less
than a week old?

Another question to follow along side this one but under the same
sort of conditions...

I have the ability to upload pictures to these ads, but I have
previously had to do this on a seperate page to that of entering the
information for the ad itself.

What I wish to do is have the picture upload (pureASPupload) and the
data entry to the database carrried out at the same time on the same
page.

how would I go about doing this?

how do I get one submit button to both upload the file *and* update
the DB at the same time.

many thanks


I am not sure about this. I do not think that you can do this, but I've
never tried.
It always helps if you ask one question per post, so people can choose which
wone they want to answer.

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"
Jul 19 '05 #2
1) You can execute two sql statements on your page. The first to delete the
old ads, the second to get the remaining ads. But, as Bob said - do they
have to be removed?
2) I believe ASPUpload has a method of extracting the other form field
values. Yes... here
http://www.aspupload.com/manual_simple.html
under Files and Forms Collection it tells you how and gives an example.

Tom B

"Alistair" <news@*remove*alistairb.co.uk> wrote in message
news:vu************@corp.supernews.com...
IIS, Access 2000
I have a page that tabulates data from a DB, this data is items for sale,
private ads.

is there a way that at the same time it can automatically delete entries
that are outside of a specific date..ie. more than a week old??

or should I run two queries seperately..one page which goes through the DB
and deletes out of date entries and then redirects to another page which
then outputs the remaining ones.

I don't really want to have to run an admin script every day to delete the
entries, I would prefer it to be done automatically when the data is
requested. This way the data presented is guaranteed to be up to date as the deletion is carried out immediately prior to the data being served.

Another question to follow along side this one but under the same sort of
conditions...

I have the ability to upload pictures to these ads, but I have previously
had to do this on a seperate page to that of entering the information for
the ad itself.

What I wish to do is have the picture upload (pureASPupload) and the data
entry to the database carrried out at the same time on the same page.

how would I go about doing this?

how do I get one submit button to both upload the file *and* update the DB
at the same time.

many thanks

Jul 19 '05 #3

"Bob Barrows" <re******@NOyahoo.SPAMcom> wrote in message
news:O3**************@TK2MSFTNGP11.phx.gbl...
Alistair wrote:
IIS, Access 2000
I have a page that tabulates data from a DB, this data is items for
sale, private ads.

is there a way that at the same time it can automatically delete
entries that are outside of a specific date..ie. more than a week
old??

or should I run two queries seperately..one page which goes through
the DB and deletes out of date entries and then redirects to another
page which then outputs the remaining ones.

I don't really want to have to run an admin script every day to
delete the entries, I would prefer it to be done automatically when
the data is requested. This way the data presented is guaranteed to
be up to date as the deletion is carried out immediately prior to the
data being served.


Why do they need to be deleted? Why not simply request records that are

less than a week old?

I just didn't want old records kept in the DB...the ad rate is about 100 per
week and keeping old ones would soon make for a large DB.

Another question to follow along side this one but under the same
sort of conditions...

I have the ability to upload pictures to these ads, but I have
previously had to do this on a seperate page to that of entering the
information for the ad itself.

What I wish to do is have the picture upload (pureASPupload) and the
data entry to the database carrried out at the same time on the same
page.

how would I go about doing this?

how do I get one submit button to both upload the file *and* update
the DB at the same time.

many thanks


I am not sure about this. I do not think that you can do this, but I've
never tried.
It always helps if you ask one question per post, so people can choose

which wone they want to answer.

I have to say I haven't tried it either yet, but I thought I'd ask first, as
it seems on first glance that it might be a bit tricky.

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"

Jul 19 '05 #4
Alistair wrote:
"Bob Barrows" <re******@NOyahoo.SPAMcom> wrote in message
news:O3**************@TK2MSFTNGP11.phx.gbl...
Alistair wrote:
IIS, Access 2000
I have a page that tabulates data from a DB, this data is items for
sale, private ads.

is there a way that at the same time it can automatically delete
entries that are outside of a specific date..ie. more than a week
old??

or should I run two queries seperately..one page which goes through
the DB and deletes out of date entries and then redirects to another
page which then outputs the remaining ones.


I don't really want to have to run an admin script every day to
delete the entries, I would prefer it to be done automatically when
the data is requested. This way the data presented is guaranteed to
be up to date as the deletion is carried out immediately prior to
the data being served.


Why do they need to be deleted? Why not simply request records that
are less than a week old?


I just didn't want old records kept in the DB...the ad rate is about
100 per week and keeping old ones would soon make for a large DB.


?
How much data is in these records? You do realize that a Jet database can
grow to 2GB ...

To answer your question, there is no way to automatically delete records,
other than by scheduling a process that does the deletions.

You do realize that you can run two queries on a single page: one to delete
the old records, and the second to retrieve the new records .... There is no
need to go through this "redirect" process.

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"
Jul 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by rdemyan via AccessMonster.com | last post: by
2 posts views Thread by stan | last post: by
1 post views Thread by klimmass | last post: by
29 posts views Thread by Jon Slaughter | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.