Yes you are correct. I'm using this but the database doesn't get update. I have a Listobject on Sheet1 that gets populated with the dataset correctly with the corresponding table. Here's the code snippets from the project.
Private Sub Sheet1_Startup(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Startup
If Me.NeedsFill("NorthwndDataSet") Then
Me.EmployeesTableAdapter.Fill(Me.NorthwndDataSet.Employees)
End If
Me.Button1.Text = "Save"
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
Me.EmployeesTableAdapter.Update(Me.NorthwndDataSet.Employees)
Catch ex As System.Data.DataException
MessageBox.Show(ex.Message)
End Try
End Sub
- Here's what I do. 1. Run the project. 2. Make changes to some of the fields of the listobject. 3. Click Button1 to save changes. 4. Close the project. 5. Open the project again. 6. Changes I made were not saved.
Any ideas?? I'm using VS2005, Office 2003.
|