Just started teaching myself .net this weekend and I'm probably missing something fairly obvious![]()
I've create a simple test database and a dataset in the project. Created a simple fom and dragged a table onto it to auto-create a datagridview. All looks good and it displays the test data I populated into the DB fine.
But if I make any changes and click Save they're not getting saved. I re-run the program and they've dissapeared. The code behind the save button is here:-
I can break into the code and it does run through this routine, it passes the validation and runs the EndEdit and Update statements. It's just that nothing seems to actually change in the DB. Any ideas what I'm doing wrong?Code:Private Sub AccountBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AccountBindingNavigatorSaveItem.Click If Me.Validate() Then Me.AccountBindingSource.EndEdit() Me.AccountTableAdapter.Update(Me.BloodNGutzDataSet.Account) Else MsgBox("Validation Failed", MsgBoxStyle.OkOnly & MsgBoxStyle.Exclamation) End If End Sub




Reply With Quote
