>

ConflictTable Property

Applies To

TableDef Object.

Description

Returns the name of a side table containing the database records that conflicted during the synchronization of two replicas. The property is read-only and returns a zero-length string if there is no side table or the database is non-replicable.

Remarks

If two users at two separate replicas each make a change to the same record in the database, the changes made by one user will fail to be applied to the other replica. Consequently, the user with the failed change must address the problem in a process called "conflict resolution."

Conflict occurs at the record level, not between fields. For example, if one user changes the Address field and another updates the Phone field in the same record, then one change is rejected. Because conflict occurs at the record level, the rejection occurs even though the successful change and the rejected change are unlikely to result in a true conflict of information.

The exchange mechanism handles the record conflicts by creating conflict tables, which contain the information that would have been placed in the table, if the change had been successful. As a DAO programmer, you examine these conflict tables and work through them row by row, fixing whatever is appropriate.

All side tables are named table_conflict, where table is the original name of the table, truncated to the maximum table name length.

Note

The ConflictTable property can be used only if your application has Microsoft Access with Briefcase Replication installed.

Example

This example finds the name of the conflict table containing the records that were not updated during the replica synchronization, calls a custom routine for resolving the conflicts, deletes the record in the conflict table, and deletes the table after all records have been processed.


Sub Resolve (dbsResolve As Database)
    Dim tdfTest As TableDef, rstConflict As Recordset
    For Each tdfTest In dbsResolve.TableDefs
        If (tdfTest.ConflictTable <> " ") Then
            Set rstConflict = dbsResolve.OpenRecordset _
(tdfTest.ConflictTable) rstConflict.MoveFirst ' Process each record While Not rstConflict.EOF . . ' Do conflict resolution . rstConflict.Delete ' Remove conflicting rstConflict.MoveNext Wend rstConflict.Close End If Next tdfTest End Sub