Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: SQL-CE VS2008 C# WCF WM5
Hi,
 
I am using WCF sync service to synchronize windows mobile databse with the serve, Basically i am following the HTTP://msdn.microsoft.com/en-us/library/cc488004(v=vs.90).aspx[^] walk-through, but here in my emulator i can see the no of changes downloaded, but the local database is not updating
can any one please help me
Thanks
Srikanth
Posted 31-Jul-12 1:27am
Comments
Kenneth Haugland at 31-Jul-12 6:31am
   
I thing will have to see relevant code in the WCF file to see what you did wrong... There is loads of things that you could have done to not make it work properly. So please improve question :)
SREEKAN2 at 31-Jul-12 6:35am
   
Hi,
As i mention earlier i am just following the walk through and the code for sync is
Collapse | Copy Code
Cursor.Current = Cursors.WaitCursor;

// The WCF Service
WebReference.LocalDataCache1SyncService webSvcProxy = new SmartDeviceProject2.WebReference.LocalDataCache1SyncService();

// The Remote Server Provider Proxy
Microsoft.Synchronization.Data.ServerSyncProviderProxy serverProvider = new
Microsoft.Synchronization.Data.ServerSyncProviderProxy(webSvcProxy);

// The Sync Agent
LocalDataCache1SyncAgent syncAgent = new LocalDataCache1SyncAgent();
syncAgent.RemoteProvider = serverProvider;

syncAgent.Agents.SyncDirection = Microsoft.Synchronization.Data.SyncDirection.Bidirectional;

// Synchronize the databases
Microsoft.Synchronization.Data.SyncStatistics stats = syncAgent.Synchronize();

// Reload the DataSet/Datagrid from the local database
//customersTableAdapter.Fill(northwindDataSet.Customers);
 
// Show synchronization statistics
MessageBox.Show("Changes Downloaded: " + stats.TotalChangesDownloaded.ToString() +
"\r\n" + "Changes Uploaded: " + stats.TotalChangesUploaded.ToString());

Cursor.Current = Cursors.Default;
Thanks
Kenneth Haugland at 31-Jul-12 6:40am
   
I guess the next question would be, can you make it work with the NorthWindDataSet?
SREEKAN2 at 31-Jul-12 6:45am
   
NO, to be frank i didn't tried with that one, i am start using my own test one, but in the emulator i can see like changes downloaded: 2 but the database is not updating with that changes

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

The only thing we can do for you would be to reffer you to the sample from Microsoft were you got the code from:
 
HTTP://msdn.microsoft.com/en-us/library/cc488004(v=vs.90).aspx[^]
 
I you cant resolve it with that information you should look for tips in the WCF documentation:
http://msdn.microsoft.com/en-us/netframework/aa663324.aspx[^]
 
But of cource if you are stuck with a spesific problem we are always here to help you as best we can Smile | :)
  Permalink  
Comments
SREEKAN2 at 2-Aug-12 9:34am
   
Thanks,
Actually i was stupid, I was working on an Emulator and not checking the right place for the updated DataBase, Now i got it thanks for your help and support

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 273
1 Maciej Los 255
2 Aajmot Sk 234
3 Richard MacCutchan 200
4 Marcin Kozub 195
0 OriginalGriff 7,903
1 Sergey Alexandrovich Kryukov 7,127
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,820


Advertise | Privacy | Mobile
Web01 | 2.8.1411023.1 | Last Updated 31 Jul 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100