I was able to update my data but when I click no or cancel I still get DATA UPDATED message box. What changes do I make to my code to stop the changes and not get the updated message box?
Private Sub BtnUpdate_Click(sender As System.Object, e As System.EventArgs) Handles BtnUpdate.Click
Try
da1.Update(ds1, "Table")
MessageBox.Show("Do you want to update?", "Table", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question)
If (DialogResult.Yes) Then
MessageBox.Show("Data Updated...!")
End
ElseIf (DialogResult.No) Then
End
ElseIf DialogResult.Cancel Then
End
End If
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Sub