BOULMAN
asked on
Backup two tables from a network access db to a local db copy
I have an access database on a network that I need to copy 2 tables (say table1, table2) to local copy of the exact database. We need this as the network goes down frequently and work halts. I want a user to be able to click a button on a form and have them copy the updated network database tables to the older outdated tables on a local computer. Any suggestions?
thanks
jb
thanks
jb
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The above code looks like it will work fine. Will this overwrite the "old" table info each time I use this? I won't be able to test that until monday.
thanks
thanks
My UpdateTempTable function does, with the other, you will first need to test to see whether the table already exists. And if it does, delete before running the transferdatabase method.
My UpdateTempTable function also will let you save the new table to a temporary database on the same path as your application, and will automatically link the table from that temporary database to your application, which will avoid some of the bloating issues associated with temporary tables.
My UpdateTempTable function also will let you save the new table to a temporary database on the same path as your application, and will automatically link the table from that temporary database to your application, which will avoid some of the bloating issues associated with temporary tables.
Just a note, ...any system like this is inherently susceptible to failures.
I mean if: "the network goes down frequently and work halts"...
...Then whats to say that the network won't go down in the middle of your"Copy" operation.
Then what?!?!
Half the data is copied, and you loose the original?
You need "Rock Solid" error handling and an "Iron-Clad" "Rollback" system.
(remname the static tables, Import the new tables, verify the copy, delete the originals)
In case of a failure in the middle of the "Copy" operation, your system must be able to delete the incomplete copied table, then restore/rename the original table...
Do you have something like this in place?
It's a shame to have to go through all of this trouble for a "iff-y" network that can't fulfill one of the most basic requirements of a network...
;-)
The same time and energy might be better spent beefing up the network...
;-)
JeffCoachman
I mean if: "the network goes down frequently and work halts"...
...Then whats to say that the network won't go down in the middle of your"Copy" operation.
Then what?!?!
Half the data is copied, and you loose the original?
You need "Rock Solid" error handling and an "Iron-Clad" "Rollback" system.
(remname the static tables, Import the new tables, verify the copy, delete the originals)
In case of a failure in the middle of the "Copy" operation, your system must be able to delete the incomplete copied table, then restore/rename the original table...
Do you have something like this in place?
It's a shame to have to go through all of this trouble for a "iff-y" network that can't fulfill one of the most basic requirements of a network...
;-)
The same time and energy might be better spent beefing up the network...
;-)
JeffCoachman
...I see that fyed has already touched on this...
Please continue on with the previous experts...
;-)
Jeff
Please continue on with the previous experts...
;-)
Jeff
ASKER
Sorry for the delayed response. But IrogSinta's code works as needed.
thanks
thanks
updatetemptable "LocalTableName", "linkedTableName", True, 0