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

  • SEARCH
  • Home
  • 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 6037741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:07:07+00:00 2026-05-23T06:07:07+00:00

I am experiencing a very strange issue with custom conflict handling using the Sync

  • 0

I am experiencing a very strange issue with custom conflict handling using the Sync Framework. Considering the following simple database structure:

CREATE TABLE [dbo].[Container](
    [Id] [uniqueidentifier] NOT NULL DEFAULT newid(),
    [LocationId] [uniqueidentifier] NULL REFERENCES [dbo].[Location],
    .....
)

CREATE TABLE [dbo].[Location](
    [Id] [uniqueidentifier] NOT NULL DEFAULT newid(),
    [Name] [varchar](100) NULL,
    .....
)

Now suppose I have a container in my database. On the client, I set its LocationId to one value. On the server, I set it to some other value. I attempt a sync, and as expected, I receive an ApplyChangeFailedEvent of type LocalUpdateRemoteUpdate.

As part of my conflict resolution process, I would like to display information about the conflict to the user, and have them select the correct location. To do this, I need to read the Location corresponding to the LocationId on both the client side and the server side, and this is where the problem comes in. My reads time out, because the sync framework seems to have locked the table. sp_lock2 shows that there is a lock of type ‘X’ on the Location table.

The kicker is that this only happens for some foreign key columns on some tables. Most of them are fine, but some of them cause the exclusive lock every time.

If anyone has any idea on what specifically causes the exclusive lock during conflict resolution, or on what I can do to avoid it or work around it, it would be greatly appreciated. If I can’t reliably read from the database during conflict resolution, my entire conflict handling strategy is pretty much pointless.

UPDATE:
Looks like I was slightly wrong. It’s not locking the entire table, only the records involved in the conflict. I can do a SELECT * FROM Location WHERE ID = (id of record not involved in conflict), I just can’t do a SELECT * FROM Location WHERE Id = (id of conflict record).

  • 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-05-23T06:07:08+00:00Added an answer on May 23, 2026 at 6:07 am

    I’m not exactly sure why, but I can get around the problem by performing my reads in a READ UNCOMMITTED transaction. Go figure.

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

Sidebar

Related Questions

I'm experiencing a strange issue where my Visual Studio 2005 C++ program crashes the
Hey guys, I'm currently experiencing a very strange crash in Windows 7 in a
I'm currently experiencing a very strange problem with a CComboBox used within a CFormView
I'm experiencing a very strange problem... I have a regular ASP.Net webpage with a
I've been experiencing very inconsistent results while developing an iPhone app and trying to
I have been experimenting with Lambda expressions in Oxygene. Very simple recursive lambda expression
I'm experiencing an issue on a test machine running Red Hat Linux (kernel version
I'm experiencing what I believe is a circular dependency issue with my PHP application.
I'm experiencing an issue with ActiveMQ and would like to trace/view all ActiveMQ activity.
I am experiencing a crash while using the Boost.Spirit and Boost.Thread libraries in my

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.