I am trying to update my DGV with the following code. i have generated SQL update command in the tableadapter. but still the changes are not affecting the DB.

Any suggestions?

Code:
If Me.TabControl1.SelectedTab.Equals(Locn) Then
            If MWLocations.HasChanges Then
                Try
                    Me.LocationsBindingSource.EndEdit()
                    Me.MWLocations.AcceptChanges()
                    Me.LocationsTableAdapter.Update(Me.MWLocations.Locations)
                    MsgBox("            Update successful       ")
                Catch ex As Exception
                    MsgBox("            Update failed       ")
                End Try
            End If
        End If