السؤال Upload from Remote to client filterclause question.

  • 16/شعبان/1433 06:29 م
     
     

    I am trying to synch a SQL express database (remote) to a SQL database (main).

    I have records that do not exist on the (main) that i want to insert from (remote), but only if the column [Synch] is = 1.

    When I provision the (main)  using the following code...

    mainProvision.Tables["Order Lines"].AddFilterColumn("Synch");
    mainProvision.Tables["Order Lines"].FilterClause = "[side].[Synch] = 1";

    I get

    <FilterClause>[side].[Synch] = 1 </FilterClause>
    <FilterCol>Synch</FilterCol>

    on the (main) database config_data of the scope_config.

    When provisioning it to the (remote) database, using this code...

    DbSynchScopeDescription scopeDesc = SqlSyncDescriptionBuilder.GetDescriptionForScope("TestScope",MainConnection);
    SqlSyncScopeProvisioning clientProvision = new SqlSyncScopeProvisioning(RemoteConn, scopeDesc);
    clientProvision.Apply();

    I get no filter clause from the database config_data of the scope_config for the (remote).

    The (remote) is the database that will be creating the data that has the "Synch" column and sending it (upload) to the (main).

    Currently the Sync sends ALL records on (remote) to (main)

    What do I need to change?

جميع الردود

  • 17/شعبان/1433 01:05 ص
    المشرف
     
     

    GetDescriptionForScope does not retrieve the filters.

    try provisioning the client directly using the same provisioning code you use for the main db.