SyncAdapter.SelectConflictUpdatedRowsCommand Property

Gets or sets the query or stored procedure that is used to identify updated rows that conflict with other changes.

Namespace: Microsoft.Synchronization.Data.Server
Assembly: Microsoft.Synchronization.Data.Server (in

public IDbCommand SelectConflictUpdatedRowsCommand { get; set; }
/** @property */
public IDbCommand get_SelectConflictUpdatedRowsCommand ()

/** @property */
public void set_SelectConflictUpdatedRowsCommand (IDbCommand value)

public function get SelectConflictUpdatedRowsCommand () : IDbCommand

public function set SelectConflictUpdatedRowsCommand (value : IDbCommand)

Property Value

An IDbCommand object that contains a query or stored procedure.

Synchronization adapter commands enable you to specify the queries and stored procedures that are used to select from and apply changes to the server database. For more information, see How to: Specify Snapshot, Download, Upload, and Bidirectional Synchronization. The query or stored procedure that you specify for the SelectConflictUpdatedRowsCommand property selects conflicting rows from the base table in the server database. Synchronization Services executes this command if an insert, update, or delete operation returns a @sync_row_count value of 0. This value indicates that the operation failed. This command selects the rows for ClientInsertServerInsert, ClientUpdateServerUpdate, and ClientDeleteServerUpdate conflicts.

The following code example creates a command that selects conflicting rows from the Customer table. To view this code in the context of a complete example, see How to: Handle Data Conflicts and Errors.

SqlCommand customerUpdateConflicts = new SqlCommand();
customerUpdateConflicts.CommandText =
    "SELECT CustomerId, CustomerName, SalesPerson, CustomerType " +
    "FROM Sales.Customer " +
    "WHERE CustomerId = @CustomerId";
customerUpdateConflicts.Parameters.Add("@CustomerId", SqlDbType.UniqueIdentifier);
customerUpdateConflicts.Connection = serverConn;
customerSyncAdapter.SelectConflictUpdatedRowsCommand = customerUpdateConflicts;

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

Development Platforms

For a list of the supported platforms, see Hardware and Software Requirements (Synchronization Services).

Target Platforms