In my programming, I've had this error come up a lot recently and its stopping me from testing my code properly. It has to do with a Try/Catch piece of code I think.
The code is as follows:
The error appears when I have the bottom function included in the code.Code:Private Sub Main_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Try 'TODO: This line of code loads data into the 'LinkedContacttbls.Contact' table. You can move, or remove it, as needed. Me.ContactTableAdapter.Fill(Me.LinkedContacttbls.Contact) Catch ex As Exception MsgBox(ex.Message) End Try End Sub Private Sub btnsave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsave.Click Me.Validate() 'Validate entry Me.ContactBindingSource.EndEdit() 'End the edit to the dataset Try Me.TableAdapterManager.UpdateAll(Me.LinkedContacttbls) 'update the entrys in the DB MsgBox("Records Saved", vbOKOnly + vbExclamation) Catch ex As Exception MsgBox(ex.Message) End Try End Sub Private Sub FirstNameTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FirstNameTextBox.TextChanged Try Me.ContactTableAdapter.Search(Me.LinkedContacttbls.Contact, FirstNameTextBox.Text) LBSearch.Update() Catch op As System.InvalidOperationException System.Windows.Forms.MessageBox.Show(op.Message) End Try End Sub
I've search the internet and forums for an answer but they relate to specified DataReaders, however I dont think I have anything specified in my code as that.
Any help would be appreciated! and if not if someone could point me in the right direction!
Thank you![]()




Reply With Quote
