I have a simple MS Access database with 2 tables that contain file names, numbers, file extenstions, etc. This is used to manage a list of files to be moved, deleted, archived, and programs to be activated.
I also have a Visual Basic 2005 program to do these tasks, and one portion of it is to be able to update the database rows (each row is a seperate "task"). To do this, I set up the data source via the wizard, then dragged onto the form bound text boxes and checkboxes. This automatically created a bar with a save, new, remove buttons on it, and created code behind to manage these functions. It also created a dataset and loaded the database information into it via the data adapter.
The problem is, I can make all the changes I want and "save them" and I get no exceptions or errors, but the database remains unaltered. The code that was generated is this:
Private Sub SourceToDatabaseBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SourceToDatabaseBindingNavigatorSaveItem.Click Me.Validate() Me.SourceToDatabaseBindingSource.EndEdit() Me.SourceToDatabaseTableAdapter.Update(Me.ScheduleDataSet.SourceToDatabase) End Sub Private Sub grid_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the 'ScheduleDataSet.SourceToDatabase' table. You can move, or 'remove it, as needed. Me.SourceToDatabaseTableAdapter.Fill(Me.ScheduleDataSet.SourceToDatabase) End Sub End Class
Can anyone help here?