An object-oriented programming language developed by Microsoft that can be used in .NET.
I am using the same code and am having the same problem. @Jiachen Li-MSFT I am not getting an exception. I get the msgbox "Update successful". The data table on the form shows the new data. The edited data is just not writing to the database. When I next close and then open the project the data has not been changed. Button 1 changes the data in the DataGridView. Button2 doesn't update the (Access) database.
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
MatchedBettingDataSet.Bets(1).Site = "New Web Site Name"
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Try
Me.Validate()
Me.MatchedBettingDataSetBindingSource.EndEdit()
Me.BetsTableAdapter.Update(Me.MatchedBettingDataSet.Bets)
MsgBox("Update successful")
Catch ex As Exception
MsgBox("Update failed")
End Try
End Sub
In the past I've done everything by SQL statements but this is the first time I've used the binding method. Any help would be appreciated.