Results 1 to 4 of 4
  1. #1
    5 Star Lounger AndrewKKWalker's Avatar
    Join Date
    Apr 2001
    Location
    Cambridge, UK
    Posts
    1,020
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Replication using JRO (2000 and XP SP1)

    I want to be able to synchronize 2 data databases using JRO
    I would like to be able to do this using a small utility database that is NOT
    linked to either of the masters.
    Due to the nature of the beast it is not viable to get this done by the wizard because
    the conflict rules are set, and we want it eventually to run as schedule at night.

    I have made a start, by logging database and data paths in a local table in the synchronizer database.
    The two replicas to be synchronized comprise
    1 Replica Master (held on the initiating site
    2. Replica child on the remote site (WAN)

    I want to use Indirect replication.

    The code below is a first attempt, but I am floored by the error message that occurs at the line where the replica is connected

    Error 3709 - The connection cannot be used to perform this operation. It is either closed or invalid in this context.

    Any help much appreciated. Maybe I am barking up the wrong tree.

    CODE (so far).............................................. ........................................attached.. .......
    Attached Files Attached Files
    Andrew

  2. #2
    5 Star Lounger AndrewKKWalker's Avatar
    Join Date
    Apr 2001
    Location
    Cambridge, UK
    Posts
    1,020
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Replication using JRO (2000 and XP SP1)

    OK, so not a lot of Replication expertise about these days.

    I answered my first question anyway. I needed to use the file path as the connection string for the master replica

    strMain="CatabasePathetcNameofDatabase.mdb"
    strRem="PathToReplicanameofReplica.mdb"
    Set rdbl = New JRO.Replica
    rdbl.ActiveConnection = strMain
    rdbl.Synchronize strREM, jrSyncTypeImpExp, jrSyncModeIndirect 'So now it goes wrong here
    'Need to set up conflict resolution here for each entry and handle by rules
    DoEvents
    Set rdbl = Nothing
    Set cnl = Nothing

    BUT!!! Doesn't works for Indirect only Direct synchronization.
    This is to take place over a VPN on a Broadband connection
    Maybe I can use Direct (The database is not huge) but Indirect should be safer.

    I don't want to use the SYNCHRONIZE Manager on the two initial sites.
    It appears that this is required for Indirect (I am correct there).

    If so I might need to look at Internet Synchronization as an option

    Anyone know anything about this at all?
    Because I am wading up stream through porridge on this at the moment
    and there seems very little easy to follow documentation.
    Andrew

  3. #3
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Replication using JRO (2000 and XP SP1)

    Sorry - I've been away from the Lounge for a few days. You are correct that you must use the Replication Manager (or recreate it's functionality) in order to do indirect synchronization. In many respects it is preferrable to direct synchronization, as direct seems to operate much slower. One challenge may be getting a copy of the Developer Edition of 2000 if you don't already have it. And I haven't tinkered with the XP version, so I don't know if you can replicate 2000 databases - though I should think you could. I presume you have found the MS KBase articles that deal with replication - if not, we have a tutorial that contains several links to the major ones.

    The most complete information I've seen is in the Access Developer's Handbook by Litwin, Getz, et. al. - it has lots of information about Internet synchronization as well as JRO and the things you can and can't do with it. If you don't have that, I would highly recommend getting it.
    Wendell

  4. #4
    5 Star Lounger AndrewKKWalker's Avatar
    Join Date
    Apr 2001
    Location
    Cambridge, UK
    Posts
    1,020
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Replication using JRO (2000 and XP SP1)

    Thanks Wendell.
    You have at least confirmed my thoughts
    I have got the MS articles and yes I do have a copy of the Developers handbook
    (It is the best book around for any version), and been very useful on the matter
    of conflict resolution. Unfortunately the JRO code only seems to deal fully with
    Direct synchronization.
    I was hoping not to use the Replication Manager, but it looks like I might have to.
    Initially we might test the direct method and see how that goes.
    The database is not large and the model simple.
    Also although not fast, the connection is stable and there is no drop out.
    I am only looking to synchronize once a day.
    Also I want to run it from a small utility database that will
    be triggered process the data and close from a windows event management
    during normal database down time.
    If this method looks like it will be inefficient, I will explore the indirect method further.

    Thanks for your reply.
    I'll let you know how it all pans out.

    I have attached a small snippet of the code that does the direct synchronise and tidy.
    It runs from the master end, and changes in the main database have total priority
    in the event of a conflict.

    If you notice any major howlers I'd appreciate your knowledgeable input

    Thanks
    Attached Files Attached Files
    Andrew

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •