|
-
Aug 7th, 2005, 06:34 AM
#1
Thread Starter
Junior Member
Update Database Error
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?
-
Aug 7th, 2005, 09:55 PM
#2
Re: Update Database Error
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|