"Transferring" tables structure.

omegaleph

Registered User.
Local time
Today, 04:10
Joined
Jul 3, 2008
Messages
27
Hello all.

I have a database that has up-to-date data but is missing all the structure (I won't go into why this happened...). I have a backup version that has the exact same tables but with all the structure (i.e. primary keys, validation, default values etc.) intact.

Is there a way to get that structure from the backup version into the current database without losing data? (Other than, of course, manually doing it, which would take days, if not weeks)

One thing I tried is deleting all the data from the old table, copying the current data into it and the using this table (i.e. putting it in the current database). The only problem is that I get paste errors as the validation rules were not applied retroactively, so some entries in the table do not follow them. Is there a way for me to paste and Access to just ignore the paste errors and paste anyways?

Other than that, is there a better way to do this?

Thanks very much.
Greg
 
If you do a MakeTable query the resulting table will lose the various requirements.

Try doing a MakeTable query, delete the contnets resulting table and then try an Append query to the new table from your current table.

However, the field types remain the same so you could not have text going into a number field etc.
 
If you do a MakeTable query the resulting table will lose the various requirements.

Try doing a MakeTable query, delete the contnets resulting table and then try an Append query to the new table from your current table.

However, the field types remain the same so you could not have text going into a number field etc.

I'll try that. the field names and types are the only things preserved in the new tables, so that's good.
 
Just a thought before I try your suggestion. What if I simply copy the current table and past it into the old table, using the "append" option? In this case, it would also require matching file size. It seems to also ignore validation. The only other problem is new variables but there are very few of those in my case. I tried it on one table and am going to test the results.
 
I don't know but a MakeTable is a real simple way to go.

One thing it does not drop is the field settiing for number of characters in text field. It drops the primary key.
 

Users who are viewing this thread

Back
Top Bottom