locked
Sync selected records from client RRS feed

  • Question

  • Hi,

    Is it possible to synchronize selected records from the client?
    E.g Assume there are 10 records on server order table 5 with status = 0 and rest with status = 0. Now at client, I want download records with status = 1. is it possible?

    Thanks!


    • Moved by Hengzhe Li Friday, April 22, 2011 2:11 AM (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Wednesday, July 8, 2009 11:11 AM

Answers

  • I think you want to download selected records from the server table to the client, rihgt?

    If this is true, please do a row filtering.  Please check out,

    How to: Filter Rows and Columns, http://msdn.microsoft.com/en-us/library/bb726003.aspx.

    Here comes the sample code snippt - you may focus.

    string orderHeaderFilterClause =
        "CustomerId IN (SELECT CustomerId FROM Sales.Customer " +
                            "WHERE SalesPerson=@SalesPerson)";
    orderHeaderBuilder.FilterClause = orderHeaderFilterClause;  
    orderHeaderBuilder.FilterParameters.Add(filterParameter);
    orderHeaderBuilder.TombstoneFilterClause = orderHeaderFilterClause;
    orderHeaderBuilder.TombstoneFilterParameters.Add(filterParameter);

    this.Configuration.SyncParameters.Add(
        new SyncParameter("@SalesPerson", "Brenda Diaz"));

    Thanks.

    Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, July 22, 2009 6:02 PM
    Answerer

All replies

  • I think you want to download selected records from the server table to the client, rihgt?

    If this is true, please do a row filtering.  Please check out,

    How to: Filter Rows and Columns, http://msdn.microsoft.com/en-us/library/bb726003.aspx.

    Here comes the sample code snippt - you may focus.

    string orderHeaderFilterClause =
        "CustomerId IN (SELECT CustomerId FROM Sales.Customer " +
                            "WHERE SalesPerson=@SalesPerson)";
    orderHeaderBuilder.FilterClause = orderHeaderFilterClause;  
    orderHeaderBuilder.FilterParameters.Add(filterParameter);
    orderHeaderBuilder.TombstoneFilterClause = orderHeaderFilterClause;
    orderHeaderBuilder.TombstoneFilterParameters.Add(filterParameter);

    this.Configuration.SyncParameters.Add(
        new SyncParameter("@SalesPerson", "Brenda Diaz"));

    Thanks.

    Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, July 22, 2009 6:02 PM
    Answerer
  • Thank you
    Saturday, August 1, 2009 7:40 AM