Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8140959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T12:20:17+00:00 2026-06-06T12:20:17+00:00

I’m having an issue with the Microsoft Sync Framework 2.1 and I’m hitting a

  • 0

I’m having an issue with the Microsoft Sync Framework 2.1 and I’m hitting a stumbling block. To simplify lets say I’m syncing two tables, ConfigSet and ConfigItem, which have the following structure:

|ConfigSet        |
|-----------------|
|ConfigSetID (PK) |
|ConfigItemID (FK)|


|ConfigItem       |
|-----------------|
|ConfigItemID (PK)|
|ConfigItem.Data  |

I’m using a filtering clause for both that’s driven by ConfigSetID:

ProvisionerObject.Tables["ConfigSet"].FilterParameters.Add(new SqlParameter("@ConfigSetID", SqlDbType.UniqueIdentifier));
ProvisionerObject.Tables["ConfigSet"].FilterClause = "[side].[ConfigSetID] = @ConfigSetID"

ProvisionerObject.Tables["ConfigItem"].FilterParameters.Add(new SqlParameter("@ConfigSetID", SqlDbType.UniqueIdentifier));
ProvisionerObject.Tables["ConfigItem"].FilterClause = "[side].[ConfigItemID] in (SELECT ConfigSet.ConfigItemID FROM ConfigSet WHERE ConfigSet.ConfigSetID = @ConfigSetID)"

If I then create two ConfigItem records on the server side, ‘Item1’ & ‘Item2’, and create one ConfigSet record, ‘Set1’, that has a foreign key to to ‘Item1’, and then perform a sync it will work fine and the client will get the ‘Set1’ record and only ‘Item1’ from ConfigItem.

If I then perform an update on ‘Set1’ on the server so that it now points to ‘Item2’, the sync framework detects the changes in ConfigSet but then throws a foreign key constraint on the client saying the record ‘Item2’ doesn’t exist.

It appears that when syncing ConfigItem that it isn’t detecting any changes, because technically there have been none to ConfigItem, but the filter clause would return Item2 had this been syncing for the first time.

I understand that each table is synchronised independently, but is there a way I can force it to pick up the ‘Item2’ record even though there are no changes to that table? And even better (although I think I’m pushing my luck on this one with what the framework can do!) would be if it could remove ‘Item1’ on the client since this is technically no longer synchronised/referenced by the client.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T12:20:19+00:00Added an answer on June 6, 2026 at 12:20 pm

    unfortunately, sync framework doesnt support partition realignment or rows going in and out of scope.

    the simpliest workaround in your scenario is to do a dummy update on item2 to mark it as changed. however, this means this change will also be sent to the other clients having item2, wasted transaction since nothing has really changed.

    as for rows in the client that has gone out of scope, you can delete them from client and intercept the changes in the ChangesSelected event and remove the rows from the change dataset so they dont propagate up to the server. or you can simply, clean up the client table and reinitialize based on the new filter value.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.