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 / February 2007

Tip: Looking for answers? Try searching our database.

Event trapping associated with indirect replication

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tim - 19 Feb 2007 03:08 GMT
I finally cracked the code the other day and got an indirect
synchronization to work.  Now I'm wondering if there are any events
that I can capture to indicate progress of the indirect
synchronization.  As I'm working with users who are only occasionally
connected via VPN to our LAN, I can't use a regularly scheduled sync.
Thus, I'd like to set up code that knows when a sync is finished (I
obviously know when it starts, as the user has to click a command
button).  When the sync is finished, I'd like to shut down the
synchronizer and let the user know the results.

Any suggestions would be appreciated.
David W. Fenton - 19 Feb 2007 21:49 GMT
> I finally cracked the code the other day and got an indirect
> synchronization to work.  Now I'm wondering if there are any
[quoted text clipped - 5 lines]
> to click a command button).  When the sync is finished, I'd like
> to shut down the synchronizer and let the user know the results.

There are two approaches to this:

1. use the TSI Synchronizer and use its HistoryItems collection, OR

2. poll the Exchange History table for the last record and check the
Status field. When it's 0 the synch hasn't started. When it's 1,
it's in progress. When it's 2, it's complete with no errors. When
it's 3 it is complete, but something went wrong.

I use #1 because you can be sure you're getting the status for the
right record (which you can't with the 2nd method). The result is
the same, you loop checking the SynchStatus property of the history
item, and exit the loop when it's not 0 or 1. A hint: use DoEvents
in the loop to give up control to the OS so that other events can be
processed. If you don't the PC slows down a lot.

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.