Auto Backup programming help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need some assistance. My boss wants the database that I am creating to do
some automatic backup before the user actually
uses it. The user will have a form where they will input 2 dates, a start
date and end dates. Depending on that date range,
access is going to pull data from sql server. Now the database needs to do
this before it actually pulls the data.
When the user clicks "Upload", it has to do this

1) check table if both the start column and end column has a T in it. (the
upload screen is going to be bound to this table)
2) IF both has T, then the database has to make a copy of its current self
and store it to a location of choice. Then the
"END" column will have to change from T to F, then the actual process
will have to run. If process is completed, then the
"END" column will have to change from F to T. If not, go to step 3
3) If the END has an F before making a backup, then the database will have
to recover the previous copy from that location
where it got saved, overrighting the "corrupted" database. Also a msg
screen will have to appear telling the user that
what just happed and advise them to get in contact with the system admin.

PLease help
 
That whole scheme is based on some untested assumptions.

For example, say flags #1 and #2 are both "T". Step 2) takes the copy,
then sets flag #2 to "F". You are clearly asuming, that if the process
fails at that point, then, flag #2 will be "F" when you run the
database the next time. But I'm not sure you could rely on that.
Database changes get "cached" in various ways, some of which might
cause the change to be /discarded/, if a fault occurs at the wrong
time.

In other words, I'd sure be testing this carefully, before I relied on
it. You could find that it works 999 times from 1000, but then fails on
the one critical time when you really needed it to work!

I think you'd be better to state your problem in business terms. What
do you want to achieve from a business perspective? Maybe someone can
think of a better approach.

HTH,
TC
 
Back
Top