Answered by:
Would it be possible to get the source code for the SqlCeClientSyncProvider class?

Question
-
I have been struggling for two weeks in a effort to figure out whether or not we can use Microsoft Sync Framework in our application to do what it was intended to do, but right now I think I am pretty much blocked by the fact that there is no equivalent ClientSyncProvider class for SQL Server Express. If I could examine the source code for the only known, concrete ClientSyncProvider class that exists, I am certain that I could build something that would meet our needs.
A little background:
Our client databases are currently running SQL Server 2005 Express. Conversion of these databases to SqlCe is NOT an option. However, upgrading these databases to SQL Server 2008 Express might be an option.
I started out looking at Microsoft Sync Framework 1.0 and decided that the amount of database "framework" that needed to be constructed was going to be a maintenance problem for us. There are extra tables, triggers, and stored procedures that must be provided or modified whenever the database schema is altered. Given the number of tables in our database (and it is not a large database), the fact that every release we do involves changes to the database schema, and the fact that we are an agile development team that does frequent releases, this type of maintenance penalty is not very attractive.
I thought that using the Change Tracking capability in SQL Server 2008 might offer an attractive alternative. However, this could only be done on the 1.0 version of the Sync Framework because there is no SqlClientSyncProvider class. In fact, there is no DbClientSyncProvider class either (there is a DbServerSyncProvider class).
I have tried inheriting from the ClientSyncProvider class (there are 10 overrides that must be implemented), but the interface document is so poor I have no idea what the methods I need to implement are supposed to do. So far, I have been really unimpressed with the class level documentation in the framework, but that's another problem.
My guess is that implementing a ClientSyncProvider is a lot more complicated than a ServerSyncProvider and that is why we don't have a SqlClientSyncProvider or even a DbClientSyncProvider. I've tried plugging in a SqlSyncProvider, but that doesn't work. Perhaps if I could get a look at the source code for the SqlCeClientSyncProvider I could figure out how to construct a SqlClientSyncProvider that would be adequate for our needs.
Friday, February 19, 2010 9:01 PM
Answers
-
If you would like to sync between a SQL 2005 Express as the client and SQL SerVER 2005 or 2008 as the server, please consider using Sync Framework V2, instead of Sync Service for ADO.NET V1.
Here are some links you can try first.
1. How to: Configure and Execute Collaborative Synchronization (SQL Server)
http://msdn.microsoft.com/en-us/library/dd918848(SQL.105).aspx
2. Microsoft Sync Framework 2.0 Software Development Kit (SDK)
http://www.microsoft.com/downloads/details.aspx?FamilyID=89adbb1e-53ff-41b5-ba17-8e43a2e66254&displaylang=en
3. Database Sync - SQL Server and SQL Server Compact
http://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sync&ReleaseId=3422
4. Database Sync - SQL Server and SQL Server Express
http://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sync&ReleaseId=3762
From #4, you can see which sync provider object is created for the SQL express.
From #3, you can replace the SQL CE provider with the Sql Sync Provider for SQL Express.
Thanks.
Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.- Proposed as answer by L Zhou [MSFT]Editor Tuesday, February 23, 2010 4:20 AM
- Marked as answer by Yunwen Bai Tuesday, February 23, 2010 9:09 AM
Saturday, February 20, 2010 12:01 AMAnswerer
All replies
-
If you would like to sync between a SQL 2005 Express as the client and SQL SerVER 2005 or 2008 as the server, please consider using Sync Framework V2, instead of Sync Service for ADO.NET V1.
Here are some links you can try first.
1. How to: Configure and Execute Collaborative Synchronization (SQL Server)
http://msdn.microsoft.com/en-us/library/dd918848(SQL.105).aspx
2. Microsoft Sync Framework 2.0 Software Development Kit (SDK)
http://www.microsoft.com/downloads/details.aspx?FamilyID=89adbb1e-53ff-41b5-ba17-8e43a2e66254&displaylang=en
3. Database Sync - SQL Server and SQL Server Compact
http://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sync&ReleaseId=3422
4. Database Sync - SQL Server and SQL Server Express
http://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sync&ReleaseId=3762
From #4, you can see which sync provider object is created for the SQL express.
From #3, you can replace the SQL CE provider with the Sql Sync Provider for SQL Express.
Thanks.
Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.- Proposed as answer by L Zhou [MSFT]Editor Tuesday, February 23, 2010 4:20 AM
- Marked as answer by Yunwen Bai Tuesday, February 23, 2010 9:09 AM
Saturday, February 20, 2010 12:01 AMAnswerer -
As Leo suggested, you might want to use SyncFx V2 instead. But if you want to take a look at how to build a provider, there's a sample SQL Express Client sync provider for V1 at : http://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sync&ReleaseId=1200
- Proposed as answer by L Zhou [MSFT]Editor Tuesday, February 23, 2010 4:20 AM
Sunday, February 21, 2010 8:09 AM