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
Solved

SUPPRESS CONFLICT VIEWER

Posted on 2003-11-12
14
521 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
ID: 9733101
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
ID: 9772426
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
ID: 9809483
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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 9809960
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
ID: 9811551
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
ID: 9811683
"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
ID: 9812060
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
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 9812317
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
ID: 9816715
Ok Arthur, I'll have a root around and get back to you,
John
0
 
LVL 3

Author Comment

by:jjjtuohy
ID: 9850661
No, I haven't deserted you!
0
 
LVL 44

Accepted Solution

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

AW
0
 
LVL 39

Expert Comment

by:stevbe
ID: 10025388
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
ID: 10025734
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
ID: 10044236
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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 …

839 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