none
SyncProgress Event ScopeProgress.TotalChanges Problem RRS feed

  • Question

  • I am faily new to the 2.1 framework and am trying to setup a Progress bar that will show the percent done for each scope. The problem that I am seeing is that when the first time the SyncProgress event is fired the TotalChanges for the Scope Progress is not actually the TotalChanges. As more procedures are executed for each of the tables in the scope the TotalChanges grows so I can't really do the simple (AppliedChanges / TotalChanges) * 100 that I was wanting to.

    Is there anyway to know that the TotalChanges is actually the correct totalChanges right away or am I doing this completely wrong?

    I am using a SyncProgress event handler off of a SqlCeSyncProvider.

    Monday, November 1, 2010 6:47 PM

Answers

  • Hi,

    I believe that you synced with Batching enabled. The value of TotalChanges increases when applying a new batch because provider starts to know the number of changes to be applied in the new batch. Before reaching the last batch, the real TotalChanges of this sync session is unknown to the provider. The progress bar that you want to implement is not supported today. If it is ok for you to keep ajusting the totalChange value in your progress bar, you can still use your equation to display the progress. It is not perfect, but there is no better solution so far.

    Thanks,
    Dong


    This posting is provided AS IS with no warranties, and confers no rights.
    Monday, November 1, 2010 11:17 PM
    Moderator

All replies

  • Hi,

    I believe that you synced with Batching enabled. The value of TotalChanges increases when applying a new batch because provider starts to know the number of changes to be applied in the new batch. Before reaching the last batch, the real TotalChanges of this sync session is unknown to the provider. The progress bar that you want to implement is not supported today. If it is ok for you to keep ajusting the totalChange value in your progress bar, you can still use your equation to display the progress. It is not perfect, but there is no better solution so far.

    Thanks,
    Dong


    This posting is provided AS IS with no warranties, and confers no rights.
    Monday, November 1, 2010 11:17 PM
    Moderator
  • Yeh that's what I thought, I"ll probably have to do a psuedo progress bar that calculates the % of tables done instead. Not what I wanted but it's more of a visual representation that something is going on.
    Tuesday, November 2, 2010 1:19 PM