I have the databindings all set and can select different records, but can not add a new one.
I have tried BindingSource.AddNew.row() but can't figure out how to add data to the new row, nor does it show in the database.
I have tried
Dim ds As New myDataSet '<---Change this to the dataset name on your form Dim dr As DataRow dr = ds.Tables("Students").NewRow dr.Item(1) = "2" dr.Item(2) = "3" dr.Item(3) = "4" ds.Tables(0).Rows.Add(dr) If ds.HasChanges(DataRowState.Added) Then Me.StudentsTableAdapter.Update(ds.Tables("Students").GetChanges(DataRowState.Added)) End If
But that doesn't do anything at all. No data added, no errors.
I have tried updating a datagrid to be told it can't be updated when bound.
I look on google and nothing seems to relate to adding data to an access database when bound to the project through the datasource wizard.
I just want to learn how to do this but am stuck. Please don't say that I should use another method or whatever, I want to learn this way at the moment.