I have done code in Access which replicates six copies of a database together as
an automated process. The same method calls can be run in VB as well. (It is
Access 97, but I don't think that makes a difference, s long as the versions of
ADO, Jet, etc. are all compatible).
In VB, you need to set a reference to the "Microsoft Jet and Replication
Objects". You will also need the ADODB library. Then you declare a Replica
object, set its ActiveConnection property, and call its Synchronize method. I am
leaving out the details, of course, but you can track those down in the usual
It made sense in my case to do it in Access, in a file that acts like a hub,
with all the other replicas as spokes. This is a fairly standard way of
arranging replicated databases.
You you will need to go around the circle of replicas twice, to be sure all the
changes have a chance to get to all the other replicas. When you synchronize in
code, you can go around once in ImportChanges mode, then go around again in
ExportChanges mode, to cut down on the replication time a little. This was
useful doing it over a LAN; in your case, it might not make much difference.
Pay attention to conflicts and potential database errors. When replicas are
disconnected, it is easy for someone using one copy to delete a record, and
someone using another copy to add a related record. When you replicate, there is
an error because the deletion violates the relation.
Hope this helps, and good luck with your project.
"Bie" <cristi.nospam@beres_spamremover.ca> wrote in message
> Have any of you ever controlled MS Access Replication from a VB application?
> I have a VB6 application where I have to send copies of the underlying MS
> Access 2000 database in remote areas (no LAN or Internet connections), then
> get the databases back and synchronize them.
> Any suggestions, articles, etc. would be greatly appreciated.