The following error ususally occurs when your typed DataSet is confused about a key constraints.
- "An error has occurred during report processing.
- Exception has been thrown by the target of an invocation.
- Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints. "
- Exception has been thrown by the target of an invocation.
To fix this problem, try to delete your typed DataSet and create again by dragging a table or SP direct on the Form from your Database.
If it does not solve your problem, open your Typed DataSet in designer by double clicking on .xsd file and delete the key contraints from the column.
Here are some more threads on this topic:
- http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=364416&SiteID=1
- http://weblogs.asp.net/rosherove/archive/2004/10/03/DataSet-hell-_2D00_-_2200_Failed-to-enable-constraints.-One-or-more-rows--contain-values_2E002E002E002E002200_.aspx
- http://www.devnewsgroups.net/group/microsoft.public.dotnet.framework.adonet/topic14842.aspx
- http://www.dotnet247.com/247reference/msgs/21/108864.aspx

VerenaJamPosted Jun 29, 2015, 7:30 AM
how to for C# database ? i couldn't do it and i am stuck now. can you please show me a way to do for c# database ? thanks
sanda chinaPosted Jan 31, 2011, 5:09 PM
I got stuck on this issue and your post is exactly what I need. Thanks a lot.
AbhijeetPosted Apr 21, 2009, 3:11 AM
Very useful article Thanks