Click here to Skip to main content
11,707,470 members (76,876 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C# DataGridView WinForm
I have a DataTable in a DataSet, this DataSet is filled by an Adapter and I intended to Insert new rows to and Delete rows from this DataTable only, and I built my own InsertCommand and DeleteCommand for the adapter (the DataTable is filled from many table sources in the database). However when calling to Update method of the adapter, there is an exception saying that there is no required UpdateCommand for the adapter because there is some DataRow with Modified state, this is true but the strange is the content of the DataRow with Modified state is the same to the original version, in fact I can't find any part of my code which can modify its content and after debugging a little, its content is not really changed (I know this for sure), but why is its state turned to Modified???

Do you know any case in which the DataRow state can be Modified while its content is not really modified?

I think of the DataRow content can be modified at least twice, the first time the content is modified and the second time the content is changed back to the original version. I'll check this case later.

Thank you!
Posted 21-Mar-13 14:39pm
snehal harawande at 22-Mar-13 2:56am
Please put some code & explaination step by step so that problem can be understand.
supernorb at 22-Mar-13 3:06am
My code is too long, I just asked this here for help if anyone has any experience on this. If no I'll solve the problem myself. Thanks.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Mika Wendelius 220
1 Maciej Los 195
2 OriginalGriff 148
3 Sergey Alexandrovich Kryukov 145
4 chainerlt 110
0 OriginalGriff 9,198
1 Sergey Alexandrovich Kryukov 8,562
2 CPallini 5,189
3 Maciej Los 4,921
4 Mika Wendelius 3,856

Advertise | Privacy | Mobile
Web03 | 2.8.150819.1 | Last Updated 21 Mar 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100