SyncAdapter Class

Synchronization Services - ADO.NET 1.0 SP1

Represents a set of data commands that are used to obtain schema information and to retrieve and apply changes at the server database.

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

public ref class SyncAdapter
public class SyncAdapter
public class SyncAdapter

The SyncAdapter serves as a bridge between the DbServerSyncProvider and the server database. Modeled after the data adapter in ADO.NET, the synchronization adapter is defined for each table that is synchronized. The synchronization adapter provides the server synchronization provider with the specific commands that are required to interact with the server database, such as the InsertCommand that applies inserts from the client database to the server database. Because synchronization adapters use the ADO.NETDbCommand object, you can use any command structure that is supported by ADO.NET. This includes inline Transact-SQL, stored procedures, views, functions, and so on. The commands only require a single result that defines the structure and data to be transferred and applied.

The following code example creates a SyncAdapter object for the Customer table. The table is configured for bidirectional synchronization with conflict detection; therefore, all the available commands are specified. The commands for selecting changes from the server are inline Transact-SQL. The commands for applying changes to the server are stored procedures, which are defined in Setup Scripts for Sync Services How-to Topics. For more information about adapter commands, see How to: Specify Snapshot, Download, Upload, and Bidirectional Synchronization. To view this code in the context of a complete example, see How to: Handle Data Conflicts and Errors.

No code example is currently available or this language may not be supported.


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