CODE
Public Sub InstituteCreateButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles InstituteCreateButton.Click
Dim InstituteName As String
InstituteName = InstituteNameBox.Text
Dim InstituteCountry As String
InstituteCountry = InstituteCountryBox.Text
Try
Dim InstituteTableAdp As New InstituteBaseDataSetTableAdapters.InstituteTableTableAdapter
InstituteTableAdp.Insert(InstituteName, InstituteCountry)
MsgBox("Success")
Catch ex As Exception
MsgBox("Failed!")
End Try
InstituteCreateButton.Text = InstituteCountry
End Sub
The idea is to insert a new row when the user clicks the button. While testing, the output is success, yet when I preview the data table there is no record there.
Please Guide!