Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Crash during Update when datagridview sorted
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01221559
Message ID:
01221767
Vues:
22
Larry,

>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?

Can you post the full stack trace of the error?

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform