DbSyncConflict Class

Represents a synchronization conflict at the row level.

Inheritance Hierarchy

System.Object
  Microsoft.Synchronization.Data.DbSyncConflict

Namespace:  Microsoft.Synchronization.Data
Assembly:  Microsoft.Synchronization.Data (in Microsoft.Synchronization.Data.dll)

Syntax

'Declaration
<SerializableAttribute> _
Public Class DbSyncConflict
'Usage
Dim instance As DbSyncConflict
[SerializableAttribute]
public class DbSyncConflict
[SerializableAttribute]
public ref class DbSyncConflict
[<SerializableAttribute>]
type DbSyncConflict =  class end
public class DbSyncConflict

The DbSyncConflict type exposes the following members.

Constructors

  Name Description
Public method DbSyncConflict() Initializes a new instance of the DbSyncConflict class by using default values.
Public method DbSyncConflict(DbConflictType, DbSyncStage) Initializes a new instance of the DbSyncConflict class by using conflict type and conflict stage parameters.

Top

Properties

  Name Description
Public property ErrorMessage Gets or sets the error message that is returned when DbConflictType is set to ErrorsOccurred.
Public property LocalChange Gets the DataTable object that contains the conflicting rows from the local database.
Public property RemoteChange Gets the DataTable object that contains the conflicting rows from the remote database.
Public property Stage Gets or sets the DbSyncStage enumeration value that represents the synchronization stage during which the conflict occurred.
Public property Type Gets or sets the DbConflictType enumeration value that represents the type of synchronization conflict.

Top

Methods

  Name Description
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method ToString (Inherited from Object.)

Top

Remarks

In Sync Framework, conflicts and errors are detected at the level of the row. A row is in conflict when it has been changed at more than one node between synchronizations. Errors that occur during synchronization typically involve a constraint violation, such as a duplicate primary key. Applications should be designed to avoid conflicts if they can, because conflict detection and resolution introduce additional complexity, processing, and network traffic. 

If a row cannot be applied during synchronization, this is usually because either an error or a data conflict occurred. In both cases, the ApplyChangeFailed event is raised. Conflict and error resolution should be handled in response to this event.

Examples

For an example of how to handle conflicts, see How to: Handle Data Conflicts and Errors for Database Synchronization (SQL Server).

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.Synchronization.Data Namespace