Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

best approach for a weekly timer?

Status
Not open for further replies.

tania20

Programmer
Oct 30, 2006
148
0
0
AU
Hi, I am wanting to prompt the user to do a routine compact and backup every week and not sure of the best approach. Ive read into using the form timer to accomplish this (though this has a max of 65000ms),task scheduler. Some users will be opening the database daily, and others are likely to keep it running continually. Any ideas in the right direction appreciated?

thanx!
 
I use a custom 'system' table for such things, eg:

[tt]Table dbSystem
sysGroup (text, 50 chrs)
sysItem (text, 50 chrs)
sysValue (text, 255 chrs)[/tt]

One row in this table could be:
[tt]
sysGroup sysItem sysValue
-------- ------- --------
Application LastBackup 15/Jun/2007[/tt]

When your application opens, check to see if it's been a week (or more) since the last backup, and if not ask the user to do it. Then just update the value in this system table.

HTH

Max Hugen
Australia
 
this is the apprach i had been thinking about but im not sure what to do when the user doesnt close the application at all
 
Well, in order to repair/compact and backup, everyone will need to close the db anyway. Plus, it's bad practice for users to leave a db open - prone to data corruption if the server goes down, reboots etc.

Also, unless you want every user to get these reminders, I usually restrict such messages to an 'admin' type group of users.


Max Hugen
Australia
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top