"larsdennert[ at ]gmail.com" <larsdennert[ at ]gmail.com> wrote in news:1141495875.957882.143010[ at ]i40g2000cwc.googlegroups.com:
[Quoted Text] > I am currently direct synching two replica Access2K dbs over a > hardware VPN running on DSL modems. I'd like to progamatically > have them synch. The users currently have to select the correct > replica to synch too from the menus. The users are both locations > share each replica with the exceptioin of some laptops/tablets > that synch their replicas when they get within wireless range. I > tried some test code like this but no luck. Access doesn't > recognize the type dao.database or database as a user defined > type.
You obviously don't have a reference to DAO. When in the VBE window, go to the Tools menu and choose References. Look for Microsoft DAO 3.6 Object Library and check it.
> Public Sub synctest() > Dim mydb As dao.Database > Set mydb = OpenDatabase("p:\backup\cypress.mdb") > mydb.SYNCHRONIZE "p:\cypress.MDB", dbRepImpExpChanges > mydb.Close > synctest = 0 > End Sub
The code will then run, but I would *never* advocate doing a direct synch (which is what you're initiating there) over a DSL Internet connection -- that's simply not enough bandwidth.
> This brings me to the second item. I do not have Replication > manager. Is that needed for direct programatic synch? I'd love to > do Indirect but I don't have Replman. I downloaded TSI but the > instructions don't even say where to put the DLL much less how to > get it linked and working and from reading you need Replman > anyway.
You can get everything you need to do indirect replication by applying the Jet 4.0 replication security patch, which installs the Jet synchronizers for indirect and Internet replication. However, one person who tried to get indirect replication working with that could not make it work on PCs that did not have replication manager installed. Given that replication manager does not have to be running for it to work, and given that there are no DLLs installed with ReplMan that are referenced by the synchronizers, I suspect there's some registry keys missing that ReplMan creates. Unfortunately we never tracked down what those were.
So, basically, the long and the short of it is that you need to get ReplMan.
> My corruption solution, albeit bad, is a macro that issues a > runcommand >:"cmd /c copy mydb mydbbackup", runs a msgbox "backup complete", >:and > then does a sendkeys "%tps" to bring up the synch menu for the > user. Messy I know. I can't even use the SynchronizeNow function > from a macro because Access deadlocks. Maybe because the macro is > waiting for the synch to finish and synch is waiting for the macro > to finish and unlock something.
A direct synch over DSL will take hours. Direct synch has to open the replicas on both sides of the synch, which means pulling the remote replica file across the wire into RAM on the local PC. This is why it's a bad idea, because if there's any glitch in connectivity, you could corrupt the remote replica.
> So there it is. If anyone has any ideas to further my effort it > would be appreciated greatly. I've written a fair amount of back > end code in this db and I'm not shy about writing more. I'm still > learning VB though as my programming background is in C and > Pascal.
You might look into getting the Jet 4 security patch and seeing if you can get it to work without installing ReplMan.
-- David W. Fenton http://www.dfenton.com/ usenet at dfenton dot com http://www.dfenton.com/DFA/
|