After GenerateSnapshot how can I get ReplicaId? RRS feed

  • Question

  • After I create a CE replica by calling

    SqlCeSyncStoreSnapshotInitialization.GenerateSnapshot() and InitializeSnapshot() with my new SqlCeConnection, I need to get the replicaId for the new replica. How can I access it?

    Thursday, July 15, 2010 3:21 PM


  • Here's how I solved it:



    private string GetReplicaId(SqlCeConnection cxcn)


    SqlCeSyncProvider cxcnProvider = ConfigureCESyncProvider(cxcn);


    uint batchSize = 0;

    SyncKnowledge knowledge =

    new SyncKnowledge();


    out batchSize, out knowledge);


    string replicaId = knowledge.ReplicaId.ToString();



    return replicaId;


    • Marked as answer by wwaters Thursday, July 15, 2010 4:26 PM
    Thursday, July 15, 2010 4:26 PM