I have this DataGridView and a BindingNavigator.. Whenever I add a new entry, it returns an error that says: 'Column 'newsID' does not allow nulls.'
But in my MySQL database, the newsID column is set to AutoIncrement. How will I solve this problem?
Thank you!
Here's my code:
Public Class FormNews
Private Sub FormNews_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'UCWebDataSet.news' table. You can move, or remove it, as needed.
Me.NewsTableAdapter.Fill(Me.UCWebDataSet.news)
End Sub
Private Sub SaveToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveToolStripButton.Click
Me.Validate()
Me.NewsBindingSource.EndEdit()
Me.NewsTableAdapter.Update(Me.UCWebDataSet)
End Sub
End Class