none
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?


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

All replies