please help with expot code

agree but if the users dont have access what can I do. The current mode is they use a word doc. that gets handed back and forth until its complete. Once its complete they turn it in and someone in the office that has a connection enters that data into a database. This process works but its not very efficient and we lose data and end up with incomplete records. So to simplify a bit I thought I could have the user start a checklist complete as much as they can before they day ends then do a data dump the user 2 and so on until its complete.Once complete the data could then be loaded into the main table but not until it was complete.

When you say "users don't have access" do you mean network access or MS Access? If the latter, they don't need it. If you install the TSI Synchronizer, you can synch direct via a vbScript like this:

Code:
  Dim tsiSynch

  Set tsiSynch = CreateObject("Synch40.Synchronizer")
  tsiSynch.Running = True
  tsiSynch.UID = "Admin"
  tsiSynch.Password = "..."
  tsiSynch.DatabaseName = "E:\ClientReplicas\RepTest\wtsDataHub.mdb"
  tsiSynch.SynchDirect "\\Server\Databases\wtsData.mdb"
  msgbox "Finished Synchronization!"
  tsiSynch.Running = False
  Set tsiSynch = Nothing

Since Jet is installed on every copy of Windows starting with Windows 2000, this should work just fine once the Jet synchronizer has been run once and the TSI Synchronizer registered.

You can get the Jet synchronizer by running this Jet update:

http://support.microsoft.com/kb/321076/en-us

To initialize it, just run mstran40.exe, which is one of the files that is put on your machine when you run the update. The standard location that it will get installed in is:

%ProgramFiles%\Common Files\Microsoft Shared\Replication Manager 4.0

You can get the TSI Synchronizer here:

http://trigeminal.com/lang/1033/utility.asp?ItemID=9#9

To initialize it you can use regsvr32 or just use Access to register it by adding it as a reference in a database (after which you can remove the reference).

Once you've done that, the vbScript should run just fine, as long as provide it with the correct replica names.

Alternatively, you could program the whole thing in Word itself and provide a toolbar button to do the synch. The code would be almost identical as vbScript is quite close to actual VBA, but since I never program in Word, I can't say if it will run without change.
 
ok it think I did everything right but when I try to run the code I'm getting this error "The Synchronizer could not be found"

jon
 
ok it think I did everything right but when I try to run the code I'm getting this error "The Synchronizer could not be found"

First, check that the TSI Synchronizer DLL is registered by looking in the registry under HKEY_CLASSES_ROOT. There should be several Synch40 registry keys. Also, search the registry for "Synch40" -- this should turn up several more registry keys under the CLSID key under HKEY_CLASSES_ROOT. One of these will have the path to the DLL. If all those are in place, the TSI Synchronizer is correctly registered.

If that's the case, then you didn't initialize the synchronizer by running mstran40.exe, as my instructions said to do. If you do that, there should be a registry key HKEY_LOCAL_MACHINE/Software/Microsoft/Jet/4.0 for Transporter (that's the original name of the Jet synchronizer, which is still reflected in its file name). That will have a basic set of registry values.

I don't know if this step is required or not, but there is also a registry key that may be important for this. Copy this text into a new Notepad file and name it [something].reg and then execute it. This will create a registry key under Jet/4.0/Replication Manager/ that will point to the location of the synchronizer:

Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Replication Manager]
"SynchronizerPath"="C:\\Program Files\\Common Files\\Microsoft Shared\\Replication Manager 4.0\\mstran40.exe"

Of course, if you don't have it installed in the default location, you'll want to change the path to match where you've placed it.

You may also want to add the path to the conflict resolver, so you could add this in the REG file before you run it:

Code:
"ConflictResolverPath"="C:\\Program Files\\Common Files\\Microsoft Shared\\Database Replication\\WZCNFLCT.EXE"

Again, you'll want to change the path if the conflict resolver is not installed there.

BTW, if it's not on your machine, yoiu will need to re-run Access/Office setup and add it in. I'm not sure exactly what you choose to get it installed -- I have it installed on all my machines, so I've never missed it. But I did once run onto a machine that *didn't* have it (and didn't actually need it, so I didn't figure out how to fix it). I believe that you have to make sure the ADVANCED WIZARDS are installed, but I'm going from memory on that.

Post back if you have any more problems, but also let us know if you've succeeded.

And if you have any observations about this, I'd love it if you'd sign up for an account at the Jet Replication Wiki (http://dfenton.com/DFA/Replication/) and add some content there that reflects what you learned. There's a FAQ question on this that you might be able to add to.
 

Users who are viewing this thread

Back
Top Bottom