G
Guest
I'm tring to update my Table which haven't a primary key from a DataGrid but
I'm having the following error"Dynamic SQL generation for the UpdateCommand
is not supported against a SelectCommand that does not return any key column
information."
this the code that I'm using:
Dim cmd As New OleDbCommand("select * from Choices where ID =2", cn)
Dim adapter As New OleDbDataAdapter(cmd)
Dim cmb As New OleDbCommandBuilder(adapter)
adapter.Fill(ds)
grdQuestions.DataSource = ds.Tables(0)
adapter.Update(ds)
where could be the problem!!?
Thnks
I'm having the following error"Dynamic SQL generation for the UpdateCommand
is not supported against a SelectCommand that does not return any key column
information."
this the code that I'm using:
Dim cmd As New OleDbCommand("select * from Choices where ID =2", cn)
Dim adapter As New OleDbDataAdapter(cmd)
Dim cmb As New OleDbCommandBuilder(adapter)
adapter.Fill(ds)
grdQuestions.DataSource = ds.Tables(0)
adapter.Update(ds)
where could be the problem!!?
Thnks