How can i Synchronize .sdf Database to .mdf Database and viceversa
-
quarta-feira, 15 de fevereiro de 2012 06:56
Hi
I have a project running in tablet device it has Sdf file as its data base and we created a server database for accessing in every device(pcs) Now how should i synchronize the Sdf file data and Database in the server. Please guide me any idea?
- Movido ErikEJMVP sexta-feira, 17 de fevereiro de 2012 08:24 (From:SQL Server Compact)
Todas as Respostas
-
quinta-feira, 16 de fevereiro de 2012 09:15Provided you are using version 3.5 of SQL Server Compact - you can use Merge Replication (requires SQL Server Standard or better) or Sync Framework. Or you can roll your own web services.
Please mark as answer, if this was it. Visit my SQL Server Compact blog
-
sexta-feira, 17 de fevereiro de 2012 06:39
Hi ErikEJ
here is some code roughly coded to test the synchronization between sdf file and server file
SynchronizationSyncAgent syncAgent = new SynchronizationSyncAgent();
Microsoft.Synchronization.Data.SyncStatistics syncStats;
provided paths of the databases.....
syncAgent.LocalProvider = syncProviderClient;
syncAgent.RemoteProvider = syncProviderServer;syncAgent.clientDB.SyncDirection = Microsoft.Synchronization.Data.SyncDirection.Bidirectional;
and given remaining tables..
syncStats = syncAgent.Synchronize();----- Exception MissingMethodCaught Exception
I m getting and error in the above line as
Method not found: 'Boolean System.Data.SqlServerCe.SqlCeChangeTracking.UpgradePublicTracking(System.String)'.
Can u please help me out how to clear this exception.
-
sexta-feira, 17 de fevereiro de 2012 08:23Hi, Am moving to the sync forum to get an answer.
Please mark as answer, if this was it. Visit my SQL Server Compact blog
-
sexta-feira, 17 de fevereiro de 2012 08:30Moderador
are you running SQL CE 3.5 SP2?
check that you have the matching SQL CE and Sync Framework versions.
-
sábado, 18 de fevereiro de 2012 06:04
Hi June T
i think your right..
I m using
1. Sync Framework 1.0 SP1
2. SQL Server Compact 3.5 SP1
3. Visual Studio 2010
let me know if SQL Server Compact 3.5 SP2 is upgraded, will the exception will be cleared and sync data??
-
sábado, 18 de fevereiro de 2012 07:08Moderadorif you refer back to the matrix, Sync Framework 1.0 SP1 requires SQL Server Compact 3.5 SP2
-
sábado, 18 de fevereiro de 2012 09:08
Hi June T
Thank you for your quick response.
I refered, Yes as you said it needs SQL Server Compact 3.5 SP2,
my question is whether the above code is correct or not for synchornization?
-
domingo, 19 de fevereiro de 2012 00:30Moderador
if you have set your adapters correctly, that looks fine. if you've used the Local Database Cache wizard, then it looks fine as well.
have a look at this tutorial: Walkthrough: Creating an Occasionally Connected Application
-
quinta-feira, 23 de fevereiro de 2012 06:22
Thank you June T
its working fine.

