We help IT Professionals succeed at work.
Get Started

Creating Replica of Access DB with JRO

jd576
jd576 asked
on
1,127 Views
Last Modified: 2008-07-18
I am working to create db replica of Access 2000 db with JRO and ADO 2.8 in VB6.  

The code sample from MSDN has a problem.

This is the reference page from MSDN on JRO:
     http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacc2k/html/jrorep.asp

Here is their example from this page:
_________________________
The following code shows how to create a full, read/write replica of an existing Design Master or replica by using JRO:

Function MakeNewReplica(strReplicableDBPath As String, _
                        strDescription As String) As Integer
   Dim repReplicableDB          As New JRO.Replica
   Dim strNewReplicaDBPath      As String

   strNewReplicaDBPath = GetReplicaName(strReplicableDBPath)
   repReplicableDB.ActiveConnection = strReplicableDBPath
   repReplicableDB.CreateReplica strNewReplicaDBPath, strDescription, _
      jrRepTypeFull, jrRepVisibilityGlobal
   Set repReplicableDB = Nothing
End Function

For example, to create a new replica of the NorthwindDM.mdb Design Master, you would use the following line of code:

MakeNewReplica "c:\NorthwindDM.mdb", "c:\NwindReplica.mdb"
__________________________

THE PROBLEM:  no where in/on MSDN is the referenced function GetReplicaName() defined -- it appears in the above code line " strNewReplicaDBPath = GetReplicaName(strReplicableDBPath)".  I cannot figureout the CreateReplica method, or at least I am not making it work....  the use of "strDescription" is unclear.

Urgent help needed.  Anyone have a working routine with JRO to create replica of Access DB design master?

Comment
Watch Question
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE