Click here to Skip to main content
15,888,579 members
Articles / General Programming / Exceptions

C# DataAdapter returning Exception “Failed to enable constraints.”

Rate me:
Please Sign up or sign in to vote.
5.00/5 (2 votes)
15 Jul 2022CPOL1 min read 4.1K   2  
We explain how to debug and get more information on the generic Exception “Failed to enable constraints.”
Sometimes during work with DataAdapter, you get an Exception with a very broad message: “Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.” We will explain how to get more detailed, specific info.

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Serbia Serbia
Mark Pelf is the pen name of just another Software Engineer from Belgrade, Serbia.
My Blog https://markpelf.com/

Comments and Discussions