Dermot,
You become not happy when you see this.
This is with a WindowForms Net 2.0 dataset.
\\\
Dim dt As NorthwindDataSet.Order_DetailsDataTable = _
DirectCast(NorthwindDataSet.Order_Details.GetChang es _
(DataRowState.Deleted), _
NorthwindDataSet.Order_DetailsDataTable)
If Not dt Is Nothing Then
Me.Order_DetailsTableAdapter.Update(dt)
End If
Me.OrdersTableAdapter.Update(Me.NorthwindDataSet.O rders)
dt = DirectCast(NorthwindDataSet.Order_Details.GetChang es _
(DataRowState.Modified), _
NorthwindDataSet.Order_DetailsDataTable)
If Not dt Is Nothing Then
Me.Order_DetailsTableAdapter.Update(dt)
End If
dt = DirectCast(NorthwindDataSet.Order_Details.GetChang es _
(DataRowState.Added), NorthwindDataSet.Order_DetailsDataTable)
If Not dt Is Nothing Then
Me.Order_DetailsTableAdapter.Update(dt)
End If
Me.NorthwindDataSet.Order_Details.AcceptChanges()
///
But I hope that it helps something,
Cor
"dermot" <df*****@tommyfrench.co.ukschreef in bericht
news:11**********************@m73g2000cwd.googlegr oups.com...
Hi,
I have a vb.net application accessing a SQL Server 2005 Database.
It applys changes to the database using stored procedures.
Updates and Inserts are working fine.
Parent Table = Customers, Child Table = Orders
However if I delete a record from the parent table, customers I get a
concurrency error (fired when I try to update the child table). I
think the reason is in SQL Server 2005 the deletes automatically
cascade, but the VB application is trying to delete that customers
orders as well.
Anyway to stop that. I have a strongly typed dataset.
Regards,
Dermot