INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Transfer and/or replace Db

Transfer and/or replace Db

(OP)
Need some guidance reqarding how to copy a database in a testing environment to a production platform.

The problem that I have is that I generated database in a testing environment and then I need to replace those database in the production environment.

Need to know if there is a way to copy the testing database and replace it in the production environment. Try I the save export but it generate a different version.

Could I use the TransferDatabase command in VBA? Other suggestions and/or guidance.

Thank you,

Luis
 

RE: Transfer and/or replace Db

I infer that you are talking about an Access database rather than (for example) SQL Server, mySQL, etc.

Is the database split? (i.e. tables in one mdb and everything else in another.)

Quote:

Try I the save export but it generate a different version.

Can you explain what you mean by that? Save what export? A different version of what?

You can instantiate an instance of Access with VB and use Access commands, including TransferDatabase but would it not be easier to just do the transfer from within Access?

RE: Transfer and/or replace Db

(OP)
In access 2007 I can save the export of the table. However, when I save the export it export another version of the table. Like tbl1 if the name is already tbl. I need a way to replace tbl instead of create a tbl1 table.

In other words I need a script that copy the new table to an existing table.  

Hopefully, this help.

Luis  

RE: Transfer and/or replace Db

If you want a complete replacement of the production version of the database with the test version then just rename the production MDB file and copy the test MDB to the production location. Delete the renamed file (or archive it) after you have confirmed that everything works correctly.

If there are just specific tables that you need to copy, replacing what is in production with what is in test, then drop the production version of the table (i.e. delete it) before you do the import from the test environment.

That may have difficulties if you have foreign key relations defined that prevent removing records and/or depend on the existence of a table.

Be sure to back up the production MDB before you do this and compact the revised one after you finish.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close