January 16, 2008

TableAdapter.Update Error

Error Exception: InvalidOperationException

Error Message: Update requires a valid UpdateCommand when passed DataRow collection with modified rows.

Problem: The update command is missing from the table adapter.

Cause: I believe that this must have occured by changing the database structure after the dataset was created from it.

Solution: Configure the data table of for the table in question. Assure that "Generate Insert, Update and Delete Statments" is checked inside of Advanced Options. Finish the wizard. Your command statements will be rebuilt (including the Update command).

No comments: