Select from following answers:- Use a CommandBuilder to generate SQL statements automatically for update.

- Call the DataTable.AcceptChanges method before calling the DbDataAdapter.Update method.
- Set the MissingSchemaAction property to AddWithKey.
- All Above
When the SelectCommand property is specified dynamically at run time, such as through a query tool that takes a textual command from the user, you might not be able to specify the appropriate InsertCommand, UpdateCommand, or DeleteCommand at design time. If your DataTable maps to or is generated from a single database table, you can take advantage of the DbCommandBuilder object to generate the DeleteCommand, InsertCommand, and UpdateCommand of the DbDataAdapter automatically.
Setting the MissingSchemaAction property to AddWithKey ensures that schema information is retrieved. It does not configure DbDataAdapter to perform updates.
Calling the DataTable.AcceptChanges method commits changes to the DataTable. It does not configure DbDataAdapter to perform updates.
Show Correct Answer
Source: MeasureUp.Com | |
Alert Moderator