0

I have a DataSet where the GetChanges() return this:

An unhandled exception of type 'System.Data.ConstraintException' occurred in System.Data.dll Additional information: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.

How can I tell in what table the problem is?

It happens before I save the tables. If I skip the Getchanges(), the save is OK.

Thanks

t0mm13b
  • 34,087
  • 8
  • 78
  • 110
Ehud Grand
  • 3,501
  • 4
  • 33
  • 52
  • The information supplied is telling you exactly why. See the [MSDN](https://msdn.microsoft.com/en-us/library/4d40xefa.aspx) for further information. How many tables are referenced in the Dataset? – t0mm13b May 15 '16 at 12:46
  • The DataSet holds many table, in the currnet ViewModel (I'm using MVVM) I load only few. I've checked them all whith GetErros(), all where OK. – Ehud Grand May 15 '16 at 13:04
  • Look at this [answer](http://stackoverflow.com/a/140679/206367) and log the error. This should clue you in more. – t0mm13b May 15 '16 at 13:15

0 Answers0