Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • 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!

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

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...Over the past year I have found your site to be EXCELLENT. Never have I been able to find so many answers to such vast problems and it is an excellent service..."

Geography

Where in the world do Tek-Tips members come from?
101287 (MIS)
19 Mar 10 13:02
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
 
Golom (Programmer)
19 Mar 10 13:39
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?
101287 (MIS)
19 Mar 10 19:46
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  
Golom (Programmer)
20 Mar 10 8:55
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.

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!

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