Hi,
I've the following code used to update a record on my Access database:
When I try to update the record I get the following error: "Update requires a valid UpdateCommand when passed DataRow collection with modified rows"
Can annyone please help me?
Thanks,
João Pinto
I've the following code used to update a record on my Access database:
Code:
con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=""C:\Programaçao\Visual Basic\Inapal\ReportIt\ReportIt.mdb"";"
con.Open()
sSQL = "SELECT * FROM [Utilizadores] WHERE (User= '" & Utilizador & "')"
da = New OleDb.OleDbDataAdapter(sSQL, con)
ds.Clear()
da.Fill(ds, "Utilizadores")
ds.Tables(0).Rows(0).Item("Password") = NewPasswordTxtBx.Text
da.Update(ds, "Utilizadores")
con.Close()
Me.Close()
When I try to update the record I get the following error: "Update requires a valid UpdateCommand when passed DataRow collection with modified rows"
Can annyone please help me?
Thanks,
João Pinto