Upgrading SQL Server Compact

When an earlier version of Sync Framework is upgraded to Sync Framework 2.1, the database provider components in the Microsoft.Synchronization.Data.SqlServerCe namespace require that SQL Server Compact also be upgraded to SQL Server Compact 3.5 SP2. The first time an existing SQL Server Compact database is used by a Sync Framework component, Sync Framework automatically upgrades the database for use by Sync Framework 2.1 components. If an earlier version of SQL Server Compact is installed, Sync Framework throws a MissingMethodException exception.

After the database has been upgraded, it can no longer be used by earlier versions of Sync Framework.

Methods that Check the Database Version

The following methods automatically upgrade the SQL Server Compact database when its version does not match the Sync Framework version:

When the SqlCeSyncStoreSnapshotInitializationGenerateSnapshot(SqlCeConnection, String) method is called and the versions do not match, a DbVersionException exception is thrown.

See Also

Concepts

Considerations for Application Design and Deployment