| Milos How-To |
| VB.NET - Preserving Referential Integrity in Id Key Scenario |
Public Overrides Sub PrimaryKeyValueChanged(ByRef updatedDataSet As DataSet, ByVal tableName As String, ByVal oldKey As Integer, ByVal newKey As Integer) If tableName = "customer" Then Dim oRow As DataRow For Each oRow In updatedDataSet.Tables("orders").Rows oRow("primaryfield") = newKey Next End If End Sub