Reputation: 4564
I'm new to ASP.NET so this question may sound dumb but I really need help. I'm getting the error:
Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
So I decide to choose the quick way as suggested by Visual Studio: turn of constraints in my data set. From what I found on the Internet, the solution is to add photoDataTable.EnforceConstraints = false;
but then I get another error:
'PhotoDataSet.PhotosDataTable' does not contain a definition for 'EnforceConstraints' and no extension method 'EnforceConstraints' accepting a first argument of type 'PhotoDataSet.PhotosDataTable' could be found (are you missing a using directive or an assembly reference?)
I'm wondering if I need to include any 'using' and if so, what should I include? Otherwise, what should I do? Please help.
Upvotes: 0
Views: 2082