473,830 Members | 2,174 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2755
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*a listairb.co.uk> wrote in message
news:vu******** ****@corp.super news.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******@NOyah oo.SPAMcom> wrote in message
news:O3******** ******@TK2MSFTN GP11.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******@NOyah oo.SPAMcom> wrote in message
news:O3******** ******@TK2MSFTN GP11.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
3327
by: nick_faye | last post by:
Hi guys, i'm still a newbie in using MS Access and in VB programming. I am using DAO connection from my VB to access the entries on my MS Access table. I am having trouble in editting and deleting entries from my table because it becomes slower and slower when my table is getting bigger and bigger. What I am doing right now is get the ID of the entry to be editted/deleted and I have to loop from first entry until I found the right ID...
4
1441
by: Wilsoch | last post by:
Non-programmer here again because my developer stinks. I'm desperately seeking a solution to this issue: I need something in the open event on my main form that will cause all of the tables to delete after a set period of time (7 days). The database will be run locally on individual user's machines. Also, I have a date format issue because some of the users will have MM/DD/YY, others will have DD/MM/YY on their systems.
1
2723
by: rdemyan via AccessMonster.com | last post by:
My App has 10 or so tables that we provide that contains proprietary data. This data will need to be updated once or twice a year. I would like some comments, suggestions on my proposed strategy for updating these tables via an ftp site: 1) Post a .mdb file to our ftp web site that contains the updated tables. My App code connects to the ftp site and gets the file name for any update files on the site. I already have code to do this...
2
3417
by: stan | last post by:
I'm sure I'm missing something simple here; help will be appreciated. I've got a search form that displays records from a MySQL db matching criteria entered by the user; the search form appears again below the results. Each row of the recordset is shown with edit and delete links, which call other .php pages (one for editing, one for confirmation of the delete). All that works fine. The edit and delete-confirm pages have links to...
1
1953
by: klimmass | last post by:
Hello Does anybody know a tool/macro with can automatically add a header comment to a .cs file at saving it ? I want something like this: eg. ///Automatic comment //CREATED BY: klimmass //MODIFIED BY: klimmass //MODIFICATION DATE: DateTime.Now()
29
4263
by: Jon Slaughter | last post by:
Is it safe to remove elements from an array that foreach is working on? (normally this is not the case but not sure in php) If so is there an efficient way to handle it? (I could add the indexes to a temp array and delete afterwards if necessary but since I'm actually working in a nested situation this could get a little messy. I guess I could set there values to null and remove them afterwards? Thanks, Jon
4
2918
by: ramdil | last post by:
Hi All I have table and it have around 90000 records.Its primary key is autonumber field and it has also have date column and name, then some other columns Now i have problem with the table,as my table contains duplicate entries for a particular date.How can i delete the duplicate entries from the table for that particular column,Now i am doing manually with name column as it will be unique for that date.Can any one help me giving the query...
3
2371
allingame
by: allingame | last post by:
Need help with append and delete duplicates I have tables namely 1)emp, 2)time and 3)payroll TABLE emp ssn text U]PK name text
1
1530
by: priyammaheshwari | last post by:
Hi All I am creating a database archiving tool,in which a user can delete all the data before a date he would specify.But the problem is i am not able to create a delete query which can delete a range of data. I had created the following query <% pdt=request.form("prevdate") 'contains the date starting from which data has to be deleted cdt=request.form("currdate") 'contains the date till which data has to be deleted ' declaring...
0
9791
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10771
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10487
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10202
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7745
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5617
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5780
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3958
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3076
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.