deleting tables

Nirious

Registered User.
Local time
Today, 21:38
Joined
Jul 31, 2004
Messages
106
In my program you are allowed to make backups of the current databases to an external file. It also allowes you to get the tables back from one of those files. At least it should.

I thought this wouldn't be a biggy. I thought I'd just delete my current tables and replace them with "docmd.tranferdatabase" acImport.

But the stupid thing wont let me delete its tables because they are connected to each other. Can I somehow delete the link before deleting them?

If so will the links be there again once I restore the tables from the backup?
Or do I need to reconnect them somehow to each other.

Or maybe another approach would be to import them without deleting the original ones. Thus the new ones get the same name of the original ones + "1" or something. Than I delete all records from all my original tables. And refill them with all the records from the new ones (the + "1"-ones) And delete the new ones. And if I would do that, would it be best to use AcImport or AcLink (from docmd.tranferdatabse)

Can I have some pro's oppinion on this plz.
 
Last edited:
I encountered the same problems. My solutions:

Delete all children first, then up the family tree.

I allow users to relink tables, however, they often click the relink twice, so they get twice the linked tables one set with the "1" suffix. Yes, users are stupid.

To bullet proof my application, I cycle through the tables container deleting all linked tables before relinking. If you link from multiple backends, the actual backend must be taken into account when deleting.

I cycle through the tables containers when no children prevent deleting a parent. Otherwise, I have a table which specifies the order in which tables are deleted. It's a real pain maintaining it, that is, adding new families of tables.
 

Users who are viewing this thread

Back
Top Bottom