Microsoft Jet and Replication Objects
This example demonstrates how to create a full replica with the CreateReplica method.
Public Sub CreateRep()
Dim repMaster As New JRO.Replica
' Connect to the Northwind database.
repMaster.ActiveConnection = "C:\Program Files\Microsoft Office\" & _
"Office\Samples\Northwind.mdb"
' Delete myTestRep if it exists.
If (Dir("C:\Program Files\Microsoft Office\" & _
"Office\Samples\myTestRep.mdb") <> "") Then Kill _
("C:\Program Files\Microsoft Office\Office\Samples\" & _
"Replica of Northwind.mdb")
' Create a full replica.
repMaster.CreateReplica "C:\Program Files\Microsoft Office\" & _
"Office\Samples\Replica of Northwind.mdb", "My Full Replica1", _
jrRepTypeFull, jrRepVisibilityGlobal
End Sub