Click here to Skip to main content
Rate this: bad
good
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 15:39pm
supernorb2.6K
Comments
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 Maciej Los 315
1 OriginalGriff 273
2 Aajmot Sk 224
3 Marcin Kozub 210
4 Richard MacCutchan 200
0 OriginalGriff 7,853
1 Sergey Alexandrovich Kryukov 7,107
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,790


Advertise | Privacy | Mobile
Web03 | 2.8.1411023.1 | Last Updated 21 Mar 2013
Copyright © CodeProject, 1999-2014
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