I have these 2 buttons, the load button works, it gets all the data into the dataset and I have bound some txtboxes to the dataset so it displays the relevant info.
My problem is when I try to update the changes I make.
Please comment on my code as I have stuffed around with this for hours and can't save the updates back into the database. The bolded line is the problem.
Private Sub btnLoad_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLoad.Click
' this loads all the data from the databse into the dataset
daAuthor.Fill(PolicyCreatorDataset1)
' Confirmation message
MsgBox("You have loaded this info")
End Sub
Private Sub btnSaveChanges_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSaveChanges.Click
' This is supposed to save the changes made in the dataset into the database
daAuthor.Update(PolicyCreatorDataset1, "tblAuthor")
' Confirmation message
MsgBox("You pressed the right button to save your editing")
End Sub
Mark Van
EZ-PC Help
My problem is when I try to update the changes I make.
Please comment on my code as I have stuffed around with this for hours and can't save the updates back into the database. The bolded line is the problem.
Private Sub btnLoad_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLoad.Click
' this loads all the data from the databse into the dataset
daAuthor.Fill(PolicyCreatorDataset1)
' Confirmation message
MsgBox("You have loaded this info")
End Sub
Private Sub btnSaveChanges_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSaveChanges.Click
' This is supposed to save the changes made in the dataset into the database
daAuthor.Update(PolicyCreatorDataset1, "tblAuthor")
' Confirmation message
MsgBox("You pressed the right button to save your editing")
End Sub
Mark Van
EZ-PC Help