.NET Framework 2.0 related DataSet bug

These last couple of days, we’ve been working on fixing a bug. The application it occured in works together with a Progress proxy object which talks to a Progress database. Because that link isn’t too transparant, it was very difficult tracing the bug and finally coming up with a solution for it.

The problem occured on merging a dataset into another dataset. That would throw the most dreaded ‘System.Data.ConstraintException: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.’ exception, feared by anyone who has ever used the .NET DataSet.

The weird thing was this bug wasn’t occuring on my own and my colleague’s machine. Offcourse it popped up at the customers’ site and blocked their application. We first thought an environment issue on the server could be causing this. After ruling that out we went looking on the client side. It seems the .NET 2.0 Framework contains a bug concerning DataSets and merging which is fixed in SP1 of that same framework. We found out after comparing the Framework versions on machine which did and didn’t work, the SP1 update was the only difference. After installing SP1 everything worked well.

I hope I might save someone a couple of days of debugging. Install all framework SP’s before searching your own code 😉

.NET Framework related downloads are found here.

Related posts

Latest posts

Leave a Comment

Leave a Reply

Your email address will not be published. Required fields are marked *