General information
Category:
The Mere Mortals .NET Framework
Title:
Crash during Update when datagridview sorted
I have created a very simple app using the MM Business Maintenance template. The Parent table is linked to 1 child with multiple rows per parent. Navigating the parent in a grid correctly retrieves all the child records. Add/Editing/etc works fine.
If I click on the datagridview header of a column (to sort by that column), the navigation works properly but if I edit the parent and try to Save, the system crashes. Even though no changes were done to the child data, the SQL Profiler shows a SQL Update command to a record in the child table trying to replace the parent foreign key with a new value which happens to duplicate an existing primary key and crashes the system. None of the normal rule checking methods are called during the update so how is it happening? Is it a bug in my program, a fault with the framework or some "undocumented" .NET feature?
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only