VB Code:
AddHandler myAdapter.RowUpdated, AddressOf mySub
....
Private Sub mySub(ByVal sender As Object, ByVal e As SqlClient.SqlRowUpdatedEventArgs)
Dim cmdIdentity As New SqlClient.SqlCommand("Select @@Identity", sqlConnection)
Dim Row As DataRow
Dim RowID As Integer
'Get the row that is being updated in the DataSet
Row = e.Row
Try
'Get the updated row ID from the database
RowID = cmdIdentity.ExecuteScalar
'Update the datatable row
Row.Item("myColumn") = RowID
Catch ex As Exception
Throw New Exception("Unable to retrieve ID")
End Try
End Sub