Hello!
I have done a bit of searching around but can't seem to find anyone who has asked a simular question.
Everything works, I can add a new entry to my database and save it. Close the debug, reopen it and the entry will still be there. The issue comes when I open the actual database in the project file with Access, it doesn't show the new entries, and if I run the debug again - the new entries that had been saved before are gone.
It's as if by opening the Access Database the database is put back to how it was before Visual Studio got a hold of it? I would like to be able to open the database in case anything ever needs to be changed within the database that cannot be done though my program.
Here's my code for the "add new" and "save" buttons (and "next" & "previous"):
Thanks in advanceCode:Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Try SettingsBindingSource.EndEdit() TableAdapterManager.UpdateAll(LMDatabase) MsgBox("Saved") Catch ex As Exception MsgBox("Error While Saving") End Try End Sub Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click SettingsBindingSource.AddNew() End Sub Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click SettingsBindingSource.MoveNext() End Sub Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click SettingsBindingSource.MovePrevious() End Sub




Reply With Quote
