G
Guest
Hi,
I have a parent table associated to a child table in a dataset. I have created a foreignkey relation that has Update and Delete set to cascade. I use two datagrid one for the parent table and one for the child table. I also created two dataadapter, generated by VB.NET, and they do return the @@IDENTITY information
The problem is this, when I call the dataadapter.update method for the child table, after I have called the update method for the parent table, I get a foreignkey constraint error that value (1) must be in the parent table. If I look in the database (SQL), the parent table have the new row in there and the child table contains the first row of the rows that were supposed to be inserted
Why does the first child row get the right primarykey from the parent table and the others don't
Here is some more information..
The dataset is a typed dataset, the constraints have been created with the visual tools. I use a seed and step of -1 for the dataset's primarykeys. I also went through the forums and looked at the information that was available on the subject. I was unable to find where I did something wrong from the examples I saw in the forums
Any help will be greatly appreciated, thanks
Mik
By the way I keep getting a page stating that Microsoft's site cannot service my request when I try to send this message.
I have a parent table associated to a child table in a dataset. I have created a foreignkey relation that has Update and Delete set to cascade. I use two datagrid one for the parent table and one for the child table. I also created two dataadapter, generated by VB.NET, and they do return the @@IDENTITY information
The problem is this, when I call the dataadapter.update method for the child table, after I have called the update method for the parent table, I get a foreignkey constraint error that value (1) must be in the parent table. If I look in the database (SQL), the parent table have the new row in there and the child table contains the first row of the rows that were supposed to be inserted
Why does the first child row get the right primarykey from the parent table and the others don't
Here is some more information..
The dataset is a typed dataset, the constraints have been created with the visual tools. I use a seed and step of -1 for the dataset's primarykeys. I also went through the forums and looked at the information that was available on the subject. I was unable to find where I did something wrong from the examples I saw in the forums
Any help will be greatly appreciated, thanks
Mik
By the way I keep getting a page stating that Microsoft's site cannot service my request when I try to send this message.