Solved

replication synchronisation successful?

Posted on 2013-01-15
3
155 Views
Last Modified: 2013-01-19
hey guys,

i just tested and realised that we can't sync 2 databases at once to the main replica on the network. the 2nd database that i'm trying to sync will say that there was an error or something like that.

how can i programmatically tell that the sync was not successful and thus queue it up to sync again? thanks guys!! hrmm, i haven't tested using the method of err and on error goto 0 then looping until there is no error and exit sub, but if yall have better ways of testing if it were successful let me know ya! thanks guys!!g
0
Comment
Question by:developingprogrammer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 61

Accepted Solution

by:
mbizup earned 500 total points
ID: 38782051
If you are getting an actual error message and number, I would suggest standard error handling techniques as you described.

Another thing you can try is creating a table for synchronization history.  Write details such as user, date/time, Replica Name or ID, ETC to the history table immediately before sychronizing.   Such a table can be used to determine if syncronization was successful, and it can also let you/the user know the time of the last synchronization, and any other info you chose to store.

 If the synchroniztion was successful, you will have a matching record in the history table in your Master Design copy of the database.

You can query the Master Design copy like this:

SELECT tblSynchronizationHistory.*
FROM tblSynchronizationHistory IN "YourPath\YourMasterDatabase.mdb";

Open in new window


You can also use a "unmatched query" that Joins the history table in your replica with the history table in your Master Copy to determine if there are any unmatched records:

SELECT rep.*
FROM tblSynchronizationHistory rep 
LEFT JOIN tblSynchronizationHistory  IN "YourPath\YourMasterDatabase.mdb" m
ON rep.ID = m.ID;

Open in new window


If there are any records in the results immediately after a synchronization attempt, that indicates that the data is not the same and the synchronization was not successful.

I personally haven't used this method (again I've never had a need to replicate/synchronize databases), but it is something I would try myself with that setup.
0
 
LVL 58
ID: 38782503
<<i just tested and realised that we can't sync 2 databases at once to the main replica on the network. the 2nd database that i'm trying to sync will say that there was an error or something like that. >>

 Are you doing the synch in code or through replication manager?

Jim.
0
 

Author Comment

by:developingprogrammer
ID: 38796404
thanks jim, i was doing it through replication manager but now i'm doing it in code. mbizup gave me this code to check if we could find the design master (1st check) and then later i did a resume on error and and error would give a non-zero err object so i checked for non-zero err object (2nd check).

mbizup, thanks for your codes and suggestions / guidance! always fantastic advice as usual!! = ))
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question