I want update/edit data in database (MS Access) by using DataGridView in VB.net I used this code:
Dim sadapter As OleDb.OleDbDataAdapter
Dim sds As DataSet
sadapter.Update(sds, "marks")
then showing this message:
Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information.
If your table doesn't have a primary key you can use SqlDataAdapter.Fill
If you table doesn't have a primary key, you need to set one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With