Click here to Skip to main content
15,885,537 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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
Comments
Kenneth Haugland 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 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 31-Jul-12 6:40am    
I guess the next question would be, can you make it work with the NorthWindDataSet?
SREEKAN2 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

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 :)
 
Share this answer
 
Comments
SREEKAN2 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900