Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Replication / March 2006

Tip: Looking for answers? Try searching our database.

Yet another sync question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
larsdennert@gmail.com - 04 Mar 2006 18:11 GMT
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.

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

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.

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.

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.
David W. Fenton - 04 Mar 2006 19:38 GMT
> I am currently direct synching  two replica Access2K dbs over a
> hardware VPN running on DSL modems. I'd like to progamatically
[quoted text clipped - 5 lines]
> 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
[quoted text clipped - 3 lines]
>     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
[quoted text clipped - 5 lines]
> 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.

Signature

David W. Fenton                  http://www.dfenton.com/
usenet at dfenton dot com    http://www.dfenton.com/DFA/

larsdennert@gmail.com - 04 Mar 2006 20:01 GMT
David,
I want to thank you for the reply! The ref to DAO looks like it will
work. The code compiled! I'll mess with it when I get the time. I
figured I was missing something simple.

I'll keep trying to work in indirect. I do have that update but haven't
tried it. I wanted to get programmatic synch to work first. We have
been direct synching for years with this db and it only takes a few
minutes to do a direct sync. The mdb's are less than 20MB. We did have
a few corruptions when one of our DSL lines had a bad phone fuse.
David W. Fenton - 05 Mar 2006 19:30 GMT
> I'll keep trying to work in indirect. I do have that update but
> haven't tried it. I wanted to get programmatic synch to work
> first. We have been direct synching for years with this db and it
> only takes a few minutes to do a direct sync. The mdb's are less
> than 20MB. We did have a few corruptions when one of our DSL lines
> had a bad phone fuse.

Direct synch across a LAN is fine. Across DSL, I wouldn't do, no
matter how big the pipe.

Signature

David W. Fenton                  http://www.dfenton.com/
usenet at dfenton dot com    http://www.dfenton.com/DFA/

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.