It appears that you are not missing anything. The TableAdapter doesn't itself update, it's job is only to update the database with the changes from the Dataset.
What happens when you comment out the following line ? --- TodaysAbsentessTableAdapter.Update(DataSet2.TodaysAbsentees) --- It seems to me that this line should not be there at all... if required, you should be updating the Master table, not the child table again. On Feb 9, 5:46 pm, Laura <[email protected]> wrote: > Thanks for that. > > I wrote some code as follows: > > Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e > As System.EventArgs) Handles btnSave.Click > > Dim modifiedChildRecords As DataSet2.TodaysAbsenteesDataTable > = _ > CType(DataSet2.TodaysAbsentees.GetChanges > (Data.DataRowState.Modified), _ > DataSet2.TodaysAbsenteesDataTable) > > Try > If modifiedChildRecords IsNot Nothing Then > TodaysAbsentessTableAdapter.Update > (modifiedChildRecords) > End If > TodaysAbsentessTableAdapter.Update > (DataSet2.TodaysAbsentees) > DataSet2.AcceptChanges() > MsgBox("Update Successful!") > Catch ex As Exception > MsgBox("Update Failed!") > Finally > If modifiedChildRecords IsNot Nothing Then > modifiedChildRecords.Dispose() > End If > > End Try > End Sub > > However it's not updating. Am I missing something? > From the code i have just added, I'm obviously trying to update the > tableadabter, is that right? If the tableadapter is updated, does that > mean that the related tables get updated? > > Thanks, >
