Writing back to the Database
I am trying to write back to an access database after the dataset is edited. The problem I am having is that it isnt being saved.
Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
Dim cb As OleDb.OleDbCommandBuilder = New OleDb.OleDbCommandBuilder(da)
da.MissingSchemaAction = MissingSchemaAction.AddWithKey
da.Fill(ds, "tblKPI")
ds.Tables("Requests").Rows(inc).Item("Note") = TxtBxNotes.Text
da.Update(ds, "tblKPI")
MsgBox(TxtBxNotes.Text)
Help. I have tried many different combinations of code. tblKPI = my table name.
End Sub
|