Solved

Make a Database Design Master from VBA using JRO

Posted on 2011-02-21
4
571 Views
Last Modified: 2012-05-11
I have a database system that is using replication from Access 2003.

I have a design master template that is stored on our corporate server, and if anyone using the Front End wants to create a new project, then they would using the UI in the front end, click create new, and it would copy the design master template to a directory that they choose.  However it automatically makes that copy a Replica of the design master on the server.  Is there a way that I can copy the database from the server to the location they specify, and then set that new copy to be a design master from VBA?
0
Comment
Question by:VTKegan
  • 2
  • 2
4 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 34945968
If I'm not mistaken you can use the MakeReplicable method of the JRO library:

http://msdn.microsoft.com/en-us/library/bb237209(v=office.12).aspx

According to that page, the example code "demonstrates how to create a Design Master with the MakeReplicable method."

0
 
LVL 10

Author Comment

by:VTKegan
ID: 34945975
I tried using that method, and it throws back an error saying the database is already replicable.  But it is a replica and not the design master.
0
 
LVL 10

Author Comment

by:VTKegan
ID: 34946024
Ok... so the problem is having the template file already as a design master.  I have to use a file that has not yet been made replicable as the template, and then copy that blank file to the new location and then I can use the MakeReplicable method you suggested.  

Thanks for the help.

0
 
LVL 84
ID: 34946109
Yes - you must "promote" a replica to DM, and if you create a database from a template of a DM, then JRO will make the assumption that it's already a DM.

At least that's what I recall from my foray into replication years ago.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now