Solved

replication synchronisation successful?

Posted on 2013-01-15
3
150 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
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 57
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

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now