954,535 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Updating actual database rather than just the dataset

Okay, so I was originally having problems even saving the data, but I can now get it to stay in the dataset, and when I switch to another page it stays there when I go back to it. Although when I close the form and reopen it, the changed data has not saved. I know that it is because I have only updated the dataset and not the database, so was hoping someone could give me pointers of how to approach it.
There are no error messages or anything coming up, as it works, just doesn't save into the actual database.

Cheers

This is what I have so far:

Private Sub btnsave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsave.Click

        Dim cb As New OleDb.OleDbCommandBuilder(da)

        sql = "UPDATE tbl_CustomerDetails SET tbl_CustomerDetails.[Address Line 1] = """ + txtaddress1.Text + """ WHERE (((tbl_CustomerDetails.[Customer ID])= """ + lblidnumber.Text + """));"
       
        
        Me.Visible = False
        Homepage.Visible = True

End Sub
Nat_xo
Newbie Poster
3 posts since Mar 2011
Reputation Points: 10
Solved Threads: 0
 

You can read more here , here and here .

debasisdas
Posting Genius
6,872 posts since Feb 2007
Reputation Points: 666
Solved Threads: 434
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: