Click here to Skip to main content
15,891,033 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Thanks for nothing Visual Studio Pin
Pete O'Hanlon17-Aug-17 7:01
mvePete O'Hanlon17-Aug-17 7:01 
GeneralRe: Thanks for nothing Visual Studio Pin
GKP199217-Aug-17 23:52
professionalGKP199217-Aug-17 23:52 
GeneralRe: Thanks for nothing Visual Studio Pin
Chris Maunder18-Aug-17 7:10
cofounderChris Maunder18-Aug-17 7:10 
GeneralRe: Thanks for nothing Visual Studio Pin
Steve Naidamast18-Aug-17 4:10
professionalSteve Naidamast18-Aug-17 4:10 
GeneralRe: Thanks for nothing Visual Studio Pin
Chris Maunder18-Aug-17 8:16
cofounderChris Maunder18-Aug-17 8:16 
GeneralRe: Thanks for nothing Visual Studio Pin
wheelman570z18-Aug-17 8:46
professionalwheelman570z18-Aug-17 8:46 
GeneralRe: Thanks for nothing Visual Studio Pin
Steve Naidamast18-Aug-17 9:05
professionalSteve Naidamast18-Aug-17 9:05 
GeneralRe: Thanks for nothing Visual Studio Pin
Wearwolf18-Aug-17 4:32
Wearwolf18-Aug-17 4:32 
That's not that terrible of an error message. It's trying to tell you what you need to do to fix the issue. Although if I remember correctly they changed what level of logging was required to get the assembly load information.

I got this exception the other day "Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints" from calling "EndLoadData" on a DataTable. Which constraint caused an issue? Which column? Which row? Who knows.

The exception was coming from DataSet.EnableConstraints() which gets called by DataTable.EndLoadData(). I tried to use .NET source stepping but it wouldn't load DataSet.cs for some reason. Looking up the function in the .NET reference source I saw that the function loops through all constraints on a table and tries to enable them. Instead of throwing an exception when it found a constraint it couldn't enable it just kept a flag saying that one of the constraints had an error and then at the end it checks that flag and throws an exception if its true. At that point it no longer knows what constraint caused an issue.

I ended up copying code out of the reference source to recreate the function and using reflection to call internal methods so I could find out which constraint and which column had the error.

After that it was easy to fix.
GeneralRe: Thanks for nothing Visual Studio Pin
Chris Maunder18-Aug-17 8:14
cofounderChris Maunder18-Aug-17 8:14 
GeneralThought of the day Pin
OriginalGriff17-Aug-17 4:59
mveOriginalGriff17-Aug-17 4:59 
GeneralRe: Thought of the day Pin
W Balboos, GHB17-Aug-17 5:10
W Balboos, GHB17-Aug-17 5:10 
QuestionRe: Thought of the day Pin
megaadam17-Aug-17 5:12
professionalmegaadam17-Aug-17 5:12 
AnswerRe: Thought of the day Pin
OriginalGriff17-Aug-17 5:16
mveOriginalGriff17-Aug-17 5:16 
AnswerRe: Thought of the day Pin
W Balboos, GHB17-Aug-17 5:16
W Balboos, GHB17-Aug-17 5:16 
QuestionRe: Thought of the day Pin
megaadam17-Aug-17 5:11
professionalmegaadam17-Aug-17 5:11 
GeneralRe: Thought of the day Pin
lopatir17-Aug-17 5:37
lopatir17-Aug-17 5:37 
GeneralRe: Thought of the day Pin
OriginalGriff17-Aug-17 5:43
mveOriginalGriff17-Aug-17 5:43 
GeneralRe: Thought of the day Pin
megaadam17-Aug-17 5:52
professionalmegaadam17-Aug-17 5:52 
GeneralRe: Thought of the day Pin
Ravi Bhavnani17-Aug-17 8:43
professionalRavi Bhavnani17-Aug-17 8:43 
AnswerRe: Thought of the day Pin
MacSpudster17-Aug-17 5:53
professionalMacSpudster17-Aug-17 5:53 
GeneralAPOD Pin
R. Giskard Reventlov17-Aug-17 4:25
R. Giskard Reventlov17-Aug-17 4:25 
GeneralRe: APOD Pin
MacSpudster17-Aug-17 5:46
professionalMacSpudster17-Aug-17 5:46 
GeneralRe: APOD Pin
R. Giskard Reventlov17-Aug-17 7:08
R. Giskard Reventlov17-Aug-17 7:08 
AnswerRe: APOD Pin
RickZeeland17-Aug-17 7:02
mveRickZeeland17-Aug-17 7:02 
General32 Years Ago Today Pin
Kevin Marois17-Aug-17 4:25
professionalKevin Marois17-Aug-17 4:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.