Configuration SyncParameters always null RRS feed

  • Question

  • I have two parameters used in the sync process. These two parameters are added to the basic sync parameters.


    //add address as sync param
    Configuration.SyncParameters.Add("@myaddress", 105);
    Configuration.SyncParameters.Add("@app_version", 1);


    The @myaddress parameter is always passed to the stored procedures. The @app_version parameter is always null at the stored procedure. I do the same thing for both, but one is null.

    The events provided during the sync process indicate that both parameters are used.


    **Debug Out: 
    SessionStateChanged: SessionState [Synchronizing] 
    SyncSession.ClientId [00000000-0000-0000-0000-000000000000] 
    SyncSession.OriginatorId [0] 
    SyncSession.SessionId [34695a72-4e27-4dda-ad6c-45685e1ffb80] 
    SyncSession.SyncParameter Name: [@myaddress] Value: [105] 
    SyncSession.SyncParameter Name: [@app_version] Value: [1] 



    this.SelectIncrementalInsertsCommand.CommandText = @"sp_SelectIncrementalInserts";
    this.SelectIncrementalInsertsCommand.CommandType = CommandType.StoredProcedure;
    this.SelectIncrementalInsertsCommand.Parameters.Add(new SqlParameter("@myaddress", SqlDbType.Int));
    this.SelectIncrementalInsertsCommand.Parameters.Add(new SqlParameter("@app_version", SqlDbType.Int));
    //get incremental deletes
    this.SelectIncrementalDeletesCommand.CommandText = @"sp_SelectIncrementalDeletes";
    this.SelectIncrementalDeletesCommand.CommandType = CommandType.StoredProcedure;
    this.SelectIncrementalDeletesCommand.Parameters.Add(new SqlParameter("@myaddress", SqlDbType.Int));
    this.SelectIncrementalDeletesCommand.Parameters.Add(new SqlParameter("@app_version", SqlDbType.Int));
    //get incremental updates
    this.SelectIncrementalUpdatesCommand.CommandText = @"sp_SelectIncrementalUpdates";
    this.SelectIncrementalUpdatesCommand.CommandType = CommandType.StoredProcedure;
    this.SelectIncrementalUpdatesCommand.Parameters.Add(new SqlParameter("@myaddress", SqlDbType.Int));
    this.SelectIncrementalUpdatesCommand.Parameters.Add(new SqlParameter("@app_version", SqlDbType.Int));


    Any thoughts on why one parameter would be null and not the other?

    • Edited by drewkerwin Tuesday, July 6, 2010 11:50 PM
    Thursday, July 1, 2010 9:22 PM

All replies

  • Anyone with thoughts on this? It is looking to me like one can add only one additional sync parameter to Configuration.SyncParameters


    Tuesday, July 6, 2010 11:31 PM
  • try this: Configuration.SyncParameters.Add(new SyncParameter("@app_version", 1));
    Wednesday, July 7, 2010 11:10 AM
  • Tried that a while back. Doesn't help. The overloaded Add method I used originally is essentially the same thing.
    Wednesday, July 7, 2010 2:53 PM
  • is it null on all the the 3 select incremental SPs?
    Thursday, July 8, 2010 12:23 PM
  • Yes it is
    Friday, July 9, 2010 4:49 PM