Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transfer and/or replace Db

Status
Not open for further replies.

101287

MIS
Apr 8, 2006
189
US
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
 
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.)

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?
 
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
 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top