How to copy tables to another db

J

JWS315

Have a FE/BE and want to update the backend with new tables and fields.
Would like to use CopyObject to copy the data from the old BE to the new one
but get an error:
2387 You can't delete the table "xxxx"; it is participating in one or more
relationships.

Is there an easy way to use this approach to update the BE with new tables
and fields and then copy the data from the old to new - I don't want my users
to have logon with a different id to update the backend.

Any suggestions are appreciated!

Jerry
 
M

Marshall Barton

JWS315 said:
Have a FE/BE and want to update the backend with new tables and fields.
Would like to use CopyObject to copy the data from the old BE to the new one
but get an error:
2387 You can't delete the table "xxxx"; it is participating in one or more
relationships.

Is there an easy way to use this approach to update the BE with new tables
and fields and then copy the data from the old to new - I don't want my users
to have logon with a different id to update the backend.


Replacing tables in an existing database is a risky affair.

How about delivering an entirely new backend with the new
tables and fields already set up. Then use a bunch of
append queries to copy the data from the old backend to the
new one. This way you don't have to delete anything.

If there are only a few simple changes to the backend such
as adding some fields or a new table, then I suggest that
you use a sequence of SQL DDL statements (ALTER TABLE,
CREATE TABLE, etc) to modify the existing tables.
Alternatively, you can use a VBA procedure and DAO methods
to make the changes.
 
J

JWS315

Marshall,

Thanks for the warning, will pursue the alternatives you suggested!

Jerry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top