-
DataTable Problem
Hello techz,,,
I am building a sqltool in which all tables will be listed in a Listbox, on selection of list box item (table).., the data of the table will be loaded to the grid...
I need to update the grid on click of a save button, i am able to save some of the tables, but some tables are not able to save ...
I am using SqlcommandBuilder class.
I have read a document that the tables without primary keys is not able to update from a datatable...
Please help to clarify ...
thankzzz
-
Re: DataTable Problem
In order to update a record you have to be able to identify it. The purpose of a primary key is to uniquely identify each row in the table. If your table has no primary key the a CommandBuilder will not generate an UPDATE or DELETE statement because it has no way to uniquely identify each row.