when I want use Update method for OleDbAdapter show this error
Update require a valid UpdateCommand when passed DataRow collection with deleted Rows.
how solve that?
Printable View
when I want use Update method for OleDbAdapter show this error
Update require a valid UpdateCommand when passed DataRow collection with deleted Rows.
how solve that?
That is definitely not the error message you got. You have mixed two possible errors into one. The error message would have either paired the UpdateCommand with edited or changed rows and the DeleteCommand with deleted rows. Basically, you need to specify the SQL code that will be used to update the database. The OleDbDataAdapter class has four properties that control how the data is retrieved from (SelectCommand) and sent to (DeleteCommand, InsertCommand and UpdateCommand) the database. If you want to delete, insert or update rows then you need to specifiy the appropriate command. I suggest you take a look at the data access samples provided with the 101 samples, which you can find in a sticky thread at the top of this forum.