Client and Server Database Objects Supported by Sync Framework
The following information is included as reference for existing applications that support offline scenarios only. For developing new applications, please see Architecture and Classes for Database Synchronization.
The following describes Sync Framework support for synchronizing database objects.
Client and Server Synchronization
The DbServerSyncProvider supports tables from a server database for all kinds of synchronization. It supports views for snapshot and download-only synchronization. A single table on the client can contain data from multiple tables at the server. For more information, see How to: Create Views of Data on a Client.
Regardless of how data is stored or represented on a server, SQL Server Compact stores the data in tables at the client.
SQL Server Compact does not support schema-qualified objects, such as Sales.Customer, in which the Customer table is preceded by the Sales schema or owner. If you want to synchronize the Sales.Customer table from the AdventureWorks sample database, specify a value of Customer for TableName.
By default, the following objects are not copied to the client database: FOREIGN KEY constraints, UNIQUE constraints, DEFAULT constraints, and the SQL Server ROWGUIDCOL property. If you require these objects in the client database, add them by using SQL or by adding them to the SyncSchema object. For more information, see How to: Initialize the Client Database and Work with Table Schema.
Sync Framework supports case-sensitive collations on the server, but it has the following limitations:
Primary key columns and columns that have unique indexes or constraints cannot contain values that differ only in case, such as VALUE1 and value1.
Synchronizing database objects that differ only in case, such as TABLE1 and table1, is not supported.
The database on the server can participate in multiple synchronization sessions. However, objects in the database can participate in only one synchronization session at a time with a particular client. If a table is being synchronized and the Synchronize method is called again for that table, Sync Framework throws an exception. The client database supports only one synchronization session at a time.