Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints

by leftbrainlogic 9. November 2008 17:53

This issue took me a day to figure out! Hopefully the tips below will help someone else. I've found that it is caused by one of three things:

1. You modified the size of a column in your database but did not update the 'MaxLength' property column your visual studio project (data designer/ xsd file.
2. You have a mismatch between a column's type in your database and it's type in your visual studio project.
3. The number of columns in your TableAdapter "SELECT" query does not match the number of columns being returned by the "SELECT" query which is causing the exception.

I found following articles useful in solving this problem:

Please help us improve by rating and commenting on this post.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , , , ,

Software Development

Add comment


(Will show your Gravatar icon)  

biuquote
  • Comment
  • Preview
Loading



Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen