locked
Synchronization between two SQL server 2008 database RRS feed

  • Question

  • I have created server synchronization provider using DbServerSyncProvider and assigned to RemoteProvider and created cleint synchronization provider using SqlSyncProvider assigned to Local provider:
    this.LocalProvider = new SampleClientSyncProvider();
    this
    .RemoteProvider = new SampleServerSyncProvider();

    public
    class SampleClientSyncProvider : SqlSyncProvider{...}
     
    class SampleServerSyncProvider : DbServerSyncProvider{...}

    While creating client synchronization provider I am getting error :

    System.InvalidCastException was unhandled
      Message="Microsoft.Synchronization.Data.ClientSyncProvider"
      Source="Microsoft.Synchronization.Data"


    Please tell me how to create client synchronization provider for sql server 2008. Also provide if any references of sample codes. 

    • Edited by pravinmu Thursday, July 9, 2009 3:43 PM
    • Moved by Max Wang_1983 Thursday, April 21, 2011 1:20 AM forum consolidation (From:SyncFx - Technical Discussion [ReadOnly])
    Thursday, July 9, 2009 3:39 PM

All replies

  • I ran into the same problem. The example I was trying to implement used SqlCeClientSyncProvider. I was unable to figure out how to use SQL Connection to provide a SyncAgent.LocalProvider object. I am now looking at going to a peer-to-peer model( http://msdn.microsoft.com/en-us/library/cc807286.aspx ). Will re-post once I figure it out.
    Friday, July 10, 2009 5:00 PM