![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Anyone have any sample code or know of utilities to backup changed records while a backup MDB is open and in use? I know you can backup via windows file system and know of the small risk of yielding a corrupted copy. I heard about someone who used datetimestamps of latest update on the record to retrieve new or changed records using an append query and to write them to an external db. Anyone have code to do this? Anyone know of any Access utilities that backups changed database records while the database is active? |
#3
| |||
| |||
|
|
I'd have to Google to find the most descriptive I would appreciate that. Hopefully you could do without too much trouble. |
#4
| |||
| |||
|
|
synchronizing two different databases David |
#5
| |||
| |||
|
|
On 3/7/2011 1:49 PM, David-W-Fenton wrote: synchronizing two different databases David I may have found one of the posts to which you refer: http://www.accessmonster.com/Uwe/For...ternaldata/146 60/how-to-auto-synchronize-two-tables-in-access That would seem to be very robust and work regardless of any date/time stamps on the records. |
|
However it would seem that it would take a lot of time to process. |
|
If anyone has experience doing hot copy via windows, with the database open and has experienced problems from doing so, I would be interested in hearing from you. |
#6
| |||
| |||
|
|
Just this afternoon, I'm about to implement a backup in an app that periodically imports data from an external source (and runs just the kind of code described in the post above), and in this case, I intend to just create a new backup database each time. I'm going to use one of three methods: 1. automate another instance of Access and use SysCommand to make a backup of the tables (I've never been able to make this work in the past, unfortunately, but thought I'd give it a try, as it's a few lines of code). 2. use TransferDatabase to export all the tables to an empty backup database (this has to be done with automation, since I'm running it from the front end, and TransferDatabase allows you to specify an external database only in one of its arguments). 3. append all the data to an empty backup database created from a template. This is the easiest, but I'd expect the least efficient; it also has to be done in the correct order to honor RI, assuming I include RI in the empty template database). |
#7
| |||
| |||
|
|
"David-W-Fenton"<NoEmail (AT) SeeSignature (DOT) invalid> wrote in news:Xns9EA387AFD6C29f99a49ed1d0c49c5bbb2 (AT) 74 (DOT) 209.136.99: Just this afternoon, I'm about to implement a backup in an app that periodically imports data from an external source (and runs just the kind of code described in the post above), and in this case, I intend to just create a new backup database each time. I'm going to use one of three methods: 1. automate another instance of Access and use SysCommand to make a backup of the tables (I've never been able to make this work in the past, unfortunately, but thought I'd give it a try, as it's a few lines of code). 2. use TransferDatabase to export all the tables to an empty backup database (this has to be done with automation, since I'm running it from the front end, and TransferDatabase allows you to specify an external database only in one of its arguments). 3. append all the data to an empty backup database created from a template. This is the easiest, but I'd expect the least efficient; it also has to be done in the correct order to honor RI, assuming I include RI in the empty template database). I just implemented my backup using #1, which I got to work without the slightest difficulties (I don't know why I'd had problems in the past). The code is posted after my signature (the SaveAsText 6 trick to back up only tables is something Lyle Fairfield pointed out years ago). The only thing I might change in the code is to replace the Dir() check for an folder with a check using the File System Object (since the code below won't work for an empty folder), but I didn't want to add any outside dependencies. I've put in error checking to recover from a MkDir on a folder that already exists (if you use Dir() on an empty folder), but also included a commented-out line using the File System Object. The way I use the FSO is with a function that uses late binding, and I call it "FSO". I've posted it after the CreateBackup() function. So how long does this process take? |
#8
| |||
| |||
|
|
. . . something Lyle Fairfield pointed out years ago). |
#9
| |||
| |||
|
|
On 3/9/2011 1:24 PM, David-W-Fenton wrote: "David-W-Fenton"<NoEmail (AT) SeeSignature (DOT) invalid> wrote in news:Xns9EA387AFD6C29f99a49ed1d0c49c5bbb2 (AT) 74 (DOT) 209.136.99: Just this afternoon, I'm about to implement a backup in an app that periodically imports data from an external source (and runs just the kind of code described in the post above), and in this case, I intend to just create a new backup database each time. I'm going to use one of three methods: 1. automate another instance of Access and use SysCommand to make a backup of the tables (I've never been able to make this work in the past, unfortunately, but thought I'd give it a try, as it's a few lines of code). 2. use TransferDatabase to export all the tables to an empty backup database (this has to be done with automation, since I'm running it from the front end, and TransferDatabase allows you to specify an external database only in one of its arguments). 3. append all the data to an empty backup database created from a template. This is the easiest, but I'd expect the least efficient; it also has to be done in the correct order to honor RI, assuming I include RI in the empty template database). I just implemented my backup using #1, which I got to work without the slightest difficulties (I don't know why I'd had problems in the past). The code is posted after my signature (the SaveAsText 6 trick to back up only tables is something Lyle Fairfield pointed out years ago). The only thing I might change in the code is to replace the Dir() check for an folder with a check using the File System Object (since the code below won't work for an empty folder), but I didn't want to add any outside dependencies. I've put in error checking to recover from a MkDir on a folder that already exists (if you use Dir() on an empty folder), but also included a commented-out line using the File System Object. The way I use the FSO is with a function that uses late binding, and I call it "FSO". I've posted it after the CreateBackup() function. So how long does this process take? Is it something that you could reasonably do multiple times during the day, while users were actively using the system? |
#10
| |||
| |||
|
|
"BobAlston" <bobalston9 (AT) yahoo (DOT) com> wrote . . . something Lyle Fairfield pointed out years ago). Lyle, are you lurking? Has anybody heard from Lyle recently? |
![]() |
| Thread Tools | |
| Display Modes | |
| |