Information générale
Catégorie:
The Mere Mortals .NET Framework
Titre:
How to add more than 1 child to a NEW parent
My form is based on, and is similar to the CustomerOrdersForm form in the VB sample. Try this on the sample.
When a user is adding a new parent row he would like to be able to add multiple child rows at the same time. If he adds exactly one row to the child grid and then clicks the Save button the save works. If the users attempts to add a second row to the child grid before saving then he gets the exception:
INSERT statement conflicted with COLUMN FOREIGN KEY constraint 'FK_Order_Details_Orders'. The conflict occurred in database 'Northwind', table 'Orders', column 'OrderID'.
This is not a good thing. Anyone know of a way around this?
Thanks,
Max...
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement