Solved

SUPPRESS CONFLICT VIEWER

Posted on 2003-11-12
14
517 Views
Last Modified: 2010-08-05
I regularly synchronize a replica set on ten laptops but would like somehow to keep a few special tables out of the picture.

The tables are individual, single row, records specific to each machine and its user (eg current user, login/logout times, clock tracking etc). A conflict flags up because each replica alters it own copy. I want each replica to keep its copy AND not flag up a conflict in Conflict Viewer!!!

I thought I had previously solved this problem by unticking their "replicable" properties in the master but that only eliminated those tables entirely from the replicas.

J



0
Comment
Question by:jjjtuohy
  • 8
  • 5
14 Comments
 
LVL 44

Expert Comment

by:Arthur_Wood
Comment Utility
why do you need these special, individual row tables to be replicated at all.  If they are only relevant to the specific user involved, there is NO REASON that I can thnink of, to need to synchroinize them to the master.  You can always create a NON-REPLICATED table in the Replica MDB, and that/those tables(s) will NOT be synched or copied to the master.

AW
0
 
LVL 3

Author Comment

by:jjjtuohy
Comment Utility
Arthur,
That's the easy way out. It only requires exporting non-replicable tables to new replicas (and setting up the old replicas). I'm using this as an example to learn ways of intercepting calls to the Conflict Viewer using the ReplicationConflictFunction.

The two example routines are a bit vague and I'm not actually sure what it is actually doing:
##############################
Set the ReplicationConflictFunction property.
##############################

Function SetAccessProperty(obj As Object, strName As String, _
        intType As Integer, varSetting As Variant, _
        Optional blnDDL As Boolean) As Boolean
    Dim prp As Property
    Const intPropNotFound As Integer = 3270

    On Error GoTo Error_SetAccessProperty
    ' Explicitly refer to Properties collection.
    obj.Properties(strName) = varSetting
    obj.Properties.Refresh
    SetAccessProperty = True

Exit_SetAccessProperty:
    Exit Function

Error_SetAccessProperty:
    If Err = intPropNotFound Then
        ' Check whether optional argument has been passed.
        If Not IsMissing(blnDDL) Then
            ' Create property, denote type, set initial value, indicate DDL.
            Set prp = obj.CreateProperty(strName, intType, varSetting, blnDDL)
        Else
            ' Create property, denote type, set initial value.
            Set prp = obj.CreateProperty(strName, intType, varSetting)
        End If
        ' Append Property object to Properties collection.
        obj.Properties.Append prp
        obj.Properties.Refresh
        SetAccessProperty = True
        Resume Exit_SetAccessProperty
    Else
        MsgBox Err & ": " & vbCrLf & Err.Description
        SetAccessProperty = False
        Resume Exit_SetAccessProperty
    End If
End Function

##############################
Set the ReplicationConflictFunction property:
##############################
Sub SetConflictResolver()
    Dim dbs As Database, ctr As Container, doc As Document
    Dim blnReturn As Boolean

    ' Return reference to current database.
    Set dbs = CurrentDb
    ' Return reference to Databases container.
    Set ctr = dbs.Containers!Databases
    ' Return reference to SummaryInfo Document object.
    Set doc = ctr.Documents!userdefined
    blnReturn = SetAccessProperty(doc, _
        "ReplicationConflictFunction", dbText, "CustomResolver", True)
    ' Evaluate return value.
    If blnReturn = True Then
        Debug.Print "Property set successfully."
    Else
        Debug.Print "Property not set successfully."
    End If
End Sub


John
0
 
LVL 3

Author Comment

by:jjjtuohy
Comment Utility
Arthur,
Putting non replicable tables in the replicas doesn't work because they are also required in the master. Synchronization deletes the non-replicable tables in the replicas.
J
0
 
LVL 44

Expert Comment

by:Arthur_Wood
Comment Utility
why are they required in the master if the only hold data that is relevant to the specific client.  I had an application that what strucutred EXACTLY the same way, and the local tables (thos opne that held LOCALLY relevant data) what kept as just that, LOCAL and NOT replicated.

Synchronization will only affect those tables that are marked are REPLICABLE. If there is a local table in the Replica, that table is not affected by synchronization.

AW
0
 
LVL 3

Author Comment

by:jjjtuohy
Comment Utility
Arthur,
You're completely correct. It works for a test master/replica setup but not for this database. The local tables are no longer there after synchronization.

This is winding me up. The properties of those tables are not ticked for replicable/tracking and they carry no guid, s_lineage  etc dross. Every time I synch, I have to export a copy from the master. I might raise the points and call in the home guard!
John
0
 
LVL 44

Expert Comment

by:Arthur_Wood
Comment Utility
"The local tables are no longer there after synchronization." this sounds as if you are COPYING, not synchronizing.  They are not the same thing.  When you SYNCHRONIZE (using Replication), only the tables that support Replication are going to be affected.  Those tables that do not support replication are not involved in Synchronization is any way, and certainly would NOT be deleted by the Synchronization process.

"Every time I synch, I have to export a copy from the master" --> this is NOT the correct use of Syncronization.  when you Synchronize one Replica with the master, BOTH MDBS are involved, and you would simply then copy the synchronized REPLICA back to its home.  This is the source of your problem

where did you get that Idea from?

AW
0
 
LVL 3

Author Comment

by:jjjtuohy
Comment Utility
Steady on Arthur, you've gone off on the wrong track there.

I have a master db and ten direct synch replicas generated from it. I synch via the tools/replication/synchronize. After synch, a replica reports that the four tables in question are missing. Subsequently I have to export a copy of those tables to the replica. Then, and only then does the replica actually function correctly.

I will admit one unusual practice. I'm using direct synch with laptops via USB bridge cable. I believe the only problem there is that if the connection is faulty/firewalled etc then that particular replica is deleted from the replica list. In future I'm going to idiot proof it behind a synch form.
I think that this one is going to stretch you!!
Any thoughts on this?
John



0
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!

 
LVL 44

Expert Comment

by:Arthur_Wood
Comment Utility
then there is something else going on, because I have used Replication in Access, with non-replicated tables - in the Replica MDB, and never encountered the events that you are describing.  When the synchrization is carried out , the LOCAL tables remain untouched, as they do not participate in the synchronization.

Here is the relevant quote from the Access Help system:

"When you create a new table, query, form, report, macro, or module at a replica, the object is considered local and is stored only at that replica. If you want users at other replicas to be able to use the object, you must change it from local to replicable. Either create the object at or import it into the Design Master and then set the Replicable property to "T"."

So a LOCAL table, in a Replica, remains just that LOCAL.

AW
0
 
LVL 3

Author Comment

by:jjjtuohy
Comment Utility
Ok Arthur, I'll have a root around and get back to you,
John
0
 
LVL 3

Author Comment

by:jjjtuohy
Comment Utility
No, I haven't deserted you!
0
 
LVL 44

Accepted Solution

by:
Arthur_Wood earned 500 total points
Comment Utility
ok, so what's going on?

AW
0
 
LVL 39

Expert Comment

by:stevbe
Comment Utility
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: Arthur_Wood {http:#9812317}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

stevbe
EE Cleanup Volunteer
0
 
LVL 3

Author Comment

by:jjjtuohy
Comment Utility
Arthur,
I'm sorry about leaving it for so long. I'm just about ready to throw up my hands and say it's an Access bug!!!!
This is it in a nutshell:
(1) Initially, the tables in question (eg current login), were replicable.
(2) When I met the conflict problem (each replica modified its copy of the these particular tables), I deleted the tables, made the master copy local and then exported copies to the replicas.
(3) When I synchronize the set, these particular tables, in the replicas, disappear and I have to export fresh copies from the master!!!!!!

Do you have any idea what's going on, 'cos I sure as hell don't !!!
Regards,
John
0
 
LVL 3

Author Comment

by:jjjtuohy
Comment Utility
Arthur,
Sorry about delaying you so much. I'm going to hack it and code for synch & a table export in a command button.
Regards,
John

PS: If you ever find out a possible reason, I'd appreciate if you could post it on one of my threads.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
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…

771 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

13 Experts available now in Live!

Get 1:1 Help Now