-
Dec 22nd, 2014, 02:30 AM
#1
Thread Starter
Enjoy the moment
[RESOLVED] automatic access backup by dates
ive been searching the web for some time and cannot find a automatic access back with vb 6 by date
does somebody has this function or tried this before?
even a sample will be find
tnx for any help
salsa31
-
Dec 22nd, 2014, 02:58 AM
#2
Re: automatic access backup by dates
So you want to duplicate the table or database by date? Which date?
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Dec 22nd, 2014, 03:57 AM
#3
Thread Starter
Enjoy the moment
Re: automatic access backup by dates
hey NW
i want for the user to let him make a backup by his choice
e.x
he will pick the destination folder and the backup date
lets say he wants to back up each week the system
so i can use a file copy or something like that
copy the database access yes
-
Dec 22nd, 2014, 08:42 AM
#4
Re: automatic access backup by dates
Why not just back it up each time the program is started (or ended)? Not sure why you would want to burden a user when code can accomplish this periodically and automatically. The less work a user has to do, the better. If you want the user to CHOOSE a backup location (don't know why you would want to let him do that), you can simply popup a message as the program starts, or finishes, asking for that location (a default can be provided for his choice as well). Remember, users usually aren't the most knowledgeable about an application, you should GUIDE users, not let them 'go wild'.
To back up an MS Access DB is REALLY simple (as you probably know), so why not just do it automatically, say, daily, or when the program is run? (or weekly if you decide that is better---personally, I update some of mine at the beginning AND the end of my programs (automatically---no user involvement). I could, if wanted, simply let the user know (maybe in the Help portion) that the DB is backed up periodically and is located in such and such directory.
Yes, filecopy of the mdb is one way to do it.
-
Dec 22nd, 2014, 08:52 AM
#5
Thread Starter
Enjoy the moment
Re: automatic access backup by dates
hola sam
i want the user to configure automatic backup instead to backup each day manualy because it is much comfortable for the user
so he configures only 1 time to backup the database each 7 days or 4 days and thats it.
do you have a example that i can use?
-
Dec 22nd, 2014, 09:27 AM
#6
Re: automatic access backup by dates
sure...I'll post an example in a few mins.
-
Dec 22nd, 2014, 10:37 AM
#7
Re: automatic access backup by dates
Here's an example.....it used a table in the database to keep track of when and where the user wants to save his backup file.
If you run it as is, you will get an error as I did not do an IF statement if the backup file was not found....I'll let you do that....very easy, but I didn't want to do EVERYTHING for you.
It uses a menu bar on the first form to either backup the DB NOW, or allow the user to (on a second form) set the Interval and Location for future backups. You can modify intervals as you see fit.
At startup, the program checks the file last modified date to see if the interval established by the user has been exceeded (or is equal), and if so, does a backup at the last selected location.
Pretty basic stuff, BUT, you will, as I said, have to do an IF FileExists on the form load initially.
Have fun!
Attachment 121993
-
Dec 22nd, 2014, 10:43 AM
#8
Re: automatic access backup by dates
Another option is to create a separate program that will do the copy and set it up in the task scheduler to run at the given interval. This way the program does not need to be running for the backup to happen and it can be set to run at night when no one is using the db.
-
Dec 22nd, 2014, 10:49 AM
#9
Re: automatic access backup by dates
But what salsa says is the he wants the USER to establish the whens and wheres, so the user would still have to have input to that program somehow.
And as most know nothing about the Task Scheduler, putting the user input in the program itself kinda makes sense to me. BUT, as I said earlier, I'd just have daily backups done (at night like you said, DM) and just let the user know in a popup/help screen when and where it was last done. I HATE to give users those types of options...best just to do it for them.
-
Dec 22nd, 2014, 01:06 PM
#10
Thread Starter
Enjoy the moment
Re: automatic access backup by dates
tnk all of you very much for the help
-
Dec 22nd, 2014, 01:37 PM
#11
Re: [RESOLVED] automatic access backup by dates
Note that a backup operation is a great time to "compact and repair."
I usually rename the original MDB with a backup name, then compact (using either JRO or the JetComp.exe utility) the "backup" to create a new "live" MDB file. Finally I copy the original (now backup) to the backup destination folder, often on a remote file share.
This does a couple of things: it takes care of compacting and cleans up index pages in the MDB, and it preserves the original in case something went terribly wrong with the compaction operation.
See How to keep a Jet 4.0 database in top working condition.
-
Dec 22nd, 2014, 01:39 PM
#12
Thread Starter
Enjoy the moment
Re: [RESOLVED] automatic access backup by dates
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|