data grid update
-
hi i am using data grid and i want to update it when user change i but the fallowing command in button to save update but it did not work and it give error massage Dim builder As OleDbCommandBuilder = New OleDbCommandBuilder(DataAdapter1)
Dim CmdB As New OleDb.OleDbCommandBuilder(DataAdapter1) DataAdapter1.Update(DataSet1, "Section")
the error messge (Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information.) -
hi i am using data grid and i want to update it when user change i but the fallowing command in button to save update but it did not work and it give error massage Dim builder As OleDbCommandBuilder = New OleDbCommandBuilder(DataAdapter1)
Dim CmdB As New OleDb.OleDbCommandBuilder(DataAdapter1) DataAdapter1.Update(DataSet1, "Section")
the error messge (Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information.)Hello, This error comes up when the Select statement does not return any Primary key column. The SelectCommand must return at least one primary key or unique column. If none are present, an InvalidOperation exception is generated, and the commands are not generated. For more details on this, you may refer to the given MSDN Link: http://msdn.microsoft.com/en-us/library/tf579hcz.aspx[^] I hope this helps. Regards, Allen
Allen Smith Software Engineer ComponentOne LLC www.componentone.com
-
Hello, This error comes up when the Select statement does not return any Primary key column. The SelectCommand must return at least one primary key or unique column. If none are present, an InvalidOperation exception is generated, and the commands are not generated. For more details on this, you may refer to the given MSDN Link: http://msdn.microsoft.com/en-us/library/tf579hcz.aspx[^] I hope this helps. Regards, Allen
Allen Smith Software Engineer ComponentOne LLC www.componentone.com