Automated Indirect Replication Issue

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MGrowneyARSI
    New Member
    • Aug 2007
    • 90

    Automated Indirect Replication Issue

    Hello I'm Atempting to set up Indirect Replication on a DB so that the end user can have a breifcase version and it will Sync with the Master DB when is is conected to the network again I can not get my hands on Replication Manager and so i have had to find away around this. I've seen several referances to TSI Synchronizer working with Microsofts Jet40repl.exe It's a real pain but i need it to work I've found this site to be the most help http://www.vsj.co.uk/articles/display.asp?id=560
    But now that I have the jet exe and the TSI dll and have modifiyed the System Registry I'm geting a simple compile error when i try to exicute code to Sync the Master and Rep DBs the error states "user defined type not defined" On the first line of the following code.

    Code:
    Dim sync As Synchronizer
    Dim reps As Replicas
    Dim rep As Replica
    Set sync = New Synchronizer
    Set reps = sync.ReplicaSet
    sync.Running = True
    sync.SystemDB = _
         "c:\windows\system32\system.mdw"
    sync.IndirectDropbox = "c:\dropbox"
    sync.IndirectDropboxPwd = "password"
    sync.DatabaseName = _
        "C:\data\expenses.mdb"
    Set reps = sync.ReplicaSet
    For Each rep In reps
        If rep.ReplicaID <> _
            sync.ReplicaID Then
            sync.SynchIndirect _
                rep.SynchronizerID
        End If
    Next rep
    I must be missing a Referance but I'm not sure what this is poorly documented anywere I've looked on the web and I'm not sure if i missed a step of messed something up has anyone used this method before?
    TIA
    Last edited by Scott Price; Oct 6 '07, 06:45 AM. Reason: [CODE] Tags
  • Scott Price
    Recognized Expert Top Contributor
    • Jul 2007
    • 1384

    #2
    I've not used this method myself, but I suspect you'll have to look carefully for TSI's dll in the references list.

    dll's normally show as ... Type Library in the references list.

    Regards,
    Scott

    Comment

    • nico5038
      Recognized Expert Specialist
      • Nov 2006
      • 3080

      #3
      I've been using replication once in the past, but reverted the process as fast as possible.
      There are too many problems with replication (like too "old" distributed versions that won't sync anymore, etc.) and thus I switched to my own coded import/expert of the data. Basically adding a LastUpdatedDate and LastUpdatedBy field to the "im/export" tables gives a solid foundation to manage it yourself.

      For more Replication info you might download this FAQ that also holds the instruction to remove replication.... :


      Nic;o)

      Comment

      • MGrowneyARSI
        New Member
        • Aug 2007
        • 90

        #4
        Thanks Scott I had originally I had placed the Dll library in the same directory as the DB which will usually work however this time I had to paste it into the system32 directory and then browse to select it in references and It now works like a champ.
        Nico I'm interested in how you deal with conflicts with your custom Replication If you don't mind sound like allot of work but who knows I may have to follow in your footsteps.

        Comment

        • nico5038
          Recognized Expert Specialist
          • Nov 2006
          • 3080

          #5
          The first step is to detect the tables that need to be "guarded" regarding updates.
          Not all need to be guarded, like "fixed code-description" tables and tables only allowing "additions" like e.g. a "new orders" table. (In such a case you need just to make sure that you use the username or code as part of the unique orderkey to prevent collisions between the sales rep's)
          When getting rows that are duplicate, then you can chose for two options:
          1) Automatically update all non conflicting fields and leave the conflicting fields to a "master" user.
          2) Just show the original record and the two or more duplicates and have the "master" user decide to apply one (or a combination) of updates.
          As dupes won't happen generally often, the second (less coding intensive option) will often work.
          Even with replication you'll need to do something with user intervention by a masteruser for these dupes.

          By using the tables fields collection you'l be able to automate the process for multiple tables in a standard way.

          Nic;o)

          Comment

          • MGrowneyARSI
            New Member
            • Aug 2007
            • 90

            #6
            I see Seems to me that Option two is alot simpler I hope I can make Accesses Relication work If not well I've got some work to do thanks Nico, and Scott

            Comment

            Working...