SyncAdapter.SelectConflictDeletedRowsCommand Property

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

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


Public Property SelectConflictDeletedRowsCommand As IDbCommand
Dim instance As SyncAdapter
Dim value As IDbCommand

value = instance.SelectConflictDeletedRowsCommand

instance.SelectConflictDeletedRowsCommand = value
public IDbCommand SelectConflictDeletedRowsCommand { get; set; }
property IDbCommand^ SelectConflictDeletedRowsCommand {
    IDbCommand^ get ();
    void set (IDbCommand^ value);
member SelectConflictDeletedRowsCommand : IDbCommand with get, set
function get SelectConflictDeletedRowsCommand () : IDbCommand
function set SelectConflictDeletedRowsCommand (value : IDbCommand)

Property Value

Type: System.Data.IDbCommand
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 SelectConflictDeletedRowsCommand selects conflicting rows from the tombstone table in the server database. Sync Framework executes this command if the conflicting row was not found in the base table. This command selects the rows for the ClientUpdateServerDelete conflict.


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

SqlCommand customerDeleteConflicts = new SqlCommand();
customerDeleteConflicts.CommandText =
    "SELECT CustomerId, CustomerName, SalesPerson, CustomerType " +
    "FROM Sales.Customer_Tombstone " +
    "WHERE CustomerId = @CustomerId";
customerDeleteConflicts.Parameters.Add("@CustomerId", SqlDbType.UniqueIdentifier);
customerDeleteConflicts.Connection = serverConn;
customerSyncAdapter.SelectConflictDeletedRowsCommand = customerDeleteConflicts;
Dim customerDeleteConflicts As New SqlCommand()
With customerDeleteConflicts
    .CommandText = _
        "SELECT CustomerId, CustomerName, SalesPerson, CustomerType " _
      & "FROM Sales.Customer_Tombstone " + "WHERE CustomerId = @CustomerId"
    .Parameters.Add("@CustomerId", SqlDbType.UniqueIdentifier)
    .Connection = serverConn
End With
customerSyncAdapter.SelectConflictDeletedRowsCommand = customerDeleteConflicts

See Also


SyncAdapter Class

Microsoft.Synchronization.Data.Server Namespace