FIX: "A specified value violated the integrity constraints for a column or table" error if the merge publication contains many articles and constraints in SQL Server Compact 3.5

Article translations Article translations
Article ID: 2585082 - View products that this article applies to.
Expand all | Collapse all

SYMPTOMS

Consider the following scenario:
  • You install Microsoft SQL Server Compact 3.5 on a computer.
  • You create a subscriber in SQL Server Compact 3.5.
  • You download many rows from a merge publication to a database while the publisher synchronizes with the subscriber. The rows contain many articles and constraints.
In this scenario, an error message that resembles the following is logged in the SQL Server error log:
System.Data.SqlServerCe.SqlCeException
Native Error = 0, HRESULT = -2147217873, Error Message: A specified value violated the integrity constraints for a column or table.
Note This issue occurs in both 32-bit operating system and 64-bit operating system.

CAUSE

This issue occurs because an invalid exchange ID is used.

When many rows for download are in a pending state, SQL Compact Client Agent calls a retry method that uses an invalid exchange ID. Therefore, the issue that is mentioned in the "Symptoms" section occurs.

RESOLUTION

The hotfix that resolves this issue is included in cumulative update package 5 for SQL Server Compact 3.5 Service Pack 2 (SP2).

For more information about how to obtain cumulative update package 5 for SQL Server Compact 3.5 SP2, click the following article number to view the article in the Microsoft Knowledge Base:
2553608 Cumulative Update 5 for SQL Server Compact 3.5 Service Pack 2

Properties

Article ID: 2585082 - Last Review: August 17, 2011 - Revision: 2.0
APPLIES TO
  • Microsoft SQL Server Compact 3.5
Keywords: 
kbqfe kbexpertiseadvanced kbfix kbsurveynew KB2585082

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com