Wednesday, May 26, 2010

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

Came across this error with a SQL Server 2005 sproc, being called via a Visual Studio 2008 xsd table adapter.


Solution: 
Check your data adapter tables, the sproc was missing 2 columns that the datatable was expecting in the results:


http://social.msdn.microsoft.com/forums/en-US/Vsexpressvb/thread/27aec612-5ca4-41ba-80d6-0204893fdcd1/

No comments:

Post a Comment