Export (0) Print
Expand All

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 IDbCommand SelectConflictDeletedRowsCommand { get; set; }
/** @property */
public IDbCommand get_SelectConflictDeletedRowsCommand ()

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

public function get SelectConflictDeletedRowsCommand () : IDbCommand

public function set SelectConflictDeletedRowsCommand (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 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;

Show:
© 2014 Microsoft