locked
DownloadChanges and uploadchange not apply after calling synchronize method (Using Sync Designer) RRS feed

  • Question

  •  

    Hi Everybody

     

    i'm try using the sync designer to make a synchronisation between sql server 2005 and

    sql server compact sp1.

     

    I'm working with Visual Studio 2008 sp1.

     

    i have create a button to test my synchronisation with this code.

     

    LocalDataCache1SyncAgent agent = new LocalDataCache1SyncAgent();

    SyncStatistics stats = agent.Synchronize();

     

    When i look the stats, i see that they are downloadChangeApplied but they are no new entry in my sql server ce database. Someone have ideas ??

     

    Your french friend Smile

     

     

    • Moved by Tina_Tian Friday, April 22, 2011 8:03 AM (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Tuesday, October 14, 2008 4:21 PM

Answers

  •  

    Ruddy,

     

    Is this a Windows form app and, if so, did you remember to merge the contents of your DataSet with the underlying changes that have occurred to the SQL Compact database.  This would occur after the call to Synchronize() and typically looks something like the following:

     

    this.NorthwindDataSet.Merge(this.CustomerTableAdapter.GetData());

     

    Have you tried the walkthrough included in the VS 2008 documentation found here:

     

    http://msdn.microsoft.com/en-us/library/bb384472.aspx

     

    In addition, we have a video posted here that walks you through a similar exercise:

     

    http://msdn.microsoft.com/en-us/sync/cc137124.aspx

     

     

    Hope this helps,

     

    Sean Kelley

    Program Manager

    Microsoft

     

     

    Tuesday, October 14, 2008 5:20 PM
    Moderator

All replies

  •  

    Ruddy,

     

    Is this a Windows form app and, if so, did you remember to merge the contents of your DataSet with the underlying changes that have occurred to the SQL Compact database.  This would occur after the call to Synchronize() and typically looks something like the following:

     

    this.NorthwindDataSet.Merge(this.CustomerTableAdapter.GetData());

     

    Have you tried the walkthrough included in the VS 2008 documentation found here:

     

    http://msdn.microsoft.com/en-us/library/bb384472.aspx

     

    In addition, we have a video posted here that walks you through a similar exercise:

     

    http://msdn.microsoft.com/en-us/sync/cc137124.aspx

     

     

    Hope this helps,

     

    Sean Kelley

    Program Manager

    Microsoft

     

     

    Tuesday, October 14, 2008 5:20 PM
    Moderator
  •  

    Thank a lot
    Wednesday, October 15, 2008 1:54 PM
  • HI

     

    I still have one question.

     

    DownLoadChanges Aplly in the dataset but not in the database. I dont understand why.

     

    Data.CrmDataCacheDataSet ds = new OutlookAddInMenuBar.Data.CrmDataCacheDataSet();

    //Chargement des gammes

    Data.CrmDataCacheDataSetTableAdapters.GammesTableAdapter gta = new OutlookAddInMenuBar.Data.CrmDataCacheDataSetTableAdapters.GammesTableAdapter();

    gta.Fill(ds.Gammes);

    //Chargement des ca

    Data.CrmDataCacheDataSetTableAdapters.CATableAdapter cta = new OutlookAddInMenuBar.Data.CrmDataCacheDataSetTableAdapters.CATableAdapter();

    cta.Fill(ds.CA);

    //Chargement des machines

    Data.CrmDataCacheDataSetTableAdapters.MachinesTableAdapter mta = new OutlookAddInMenuBar.Data.CrmDataCacheDataSetTableAdapters.MachinesTableAdapter();

    mta.Fill(ds.Machines);

    Data.CrmStarColorDataCacheSyncAgent syncAgent = new OutlookAddInMenuBar.Data.CrmStarColorDataCacheSyncAgent();

    Microsoft.Synchronization.Data.SyncStatistics syncStats = syncAgent.Synchronize();

    //this.crmDataCacheDataSet.Gammes.Merge(this.gammesTableAdapter.GetData());

    //Mise … jour des informations

    ds.Gammes.Merge(gta.GetData());

    ds.Machines.Merge(mta.GetData());

    ds.CA.Merge(cta.GetData());

    gta.Update(ds);

    mta.Update(ds);

    cta.Update(ds);

    MessageBox.Show("Fin de la synchronisation");

     

    Any Ideas ?

    Thursday, October 16, 2008 3:28 PM