|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Get modified colums onlyIs there a way to get only the modified columns of the rows in a DataSet?
When calling DataSet.GetChanges() I'm getting the entire row, whereas I just want the columns that have been changed. Is this possible? Chris,
Afaik not standard and I don't think you can do that after that you have made your own rules what means "modified".. By instance what to do if an item (column is the item description part of the table) is modified after that another or the item was modified before or what to do by instance with a new or deleted row. I hope this gives some ideas, Cor Show quote "Chris Karcher" <ckarc***@cs.utexas.edu> schreef in bericht news:ebg9fr$bbk$1@geraldo.cc.utexas.edu... > Is there a way to get only the modified columns of the rows in a DataSet? > > When calling DataSet.GetChanges() I'm getting the entire row, whereas I > just want the columns that have been changed. Is this possible? Hi Chris,
No, there is no support for this out of the box. Why do you need such feature? -- Show quoteMiha Markic [MVP C#, INETA Country Leader for Slovenia] RightHand .NET consulting & development www.rthand.com Blog: http://cs.rthand.com/blogs/blog_with_righthand/ "Chris Karcher" <ckarc***@cs.utexas.edu> wrote in message news:ebg9fr$bbk$1@geraldo.cc.utexas.edu... > Is there a way to get only the modified columns of the rows in a DataSet? > > When calling DataSet.GetChanges() I'm getting the entire row, whereas I > just want the columns that have been changed. Is this possible? I'm wanting to build a custom update statement that only sets the fields
that have been changed. I supposed that I could always get the DiffGram XML, then compare the before and after fields by hand. I was just hoping there was a better way... Miha Markic [MVP C#] wrote: Show quote > Hi Chris, > > No, there is no support for this out of the box. > Why do you need such feature? >
www.LLBLGen.com has an OR mapper that does exactly this (as well as a lot of
other really cool things). Well worth the price. Just a happy end user. Jim Hughes Show quote "Chris" <ckarc***@cs.utexas.edu> wrote in message news:ebi0rb$2of$1@geraldo.cc.utexas.edu... > I'm wanting to build a custom update statement that only sets the fields > that have been changed. > > I supposed that I could always get the DiffGram XML, then compare the > before and after fields by hand. I was just hoping there was a better > way... > > Miha Markic [MVP C#] wrote: >> Hi Chris, >> >> No, there is no support for this out of the box. >> Why do you need such feature? >> You can still build it manually - loop through all rows and compare column
original vs current value if you need to. -- Show quoteMiha Markic [MVP C#, INETA Country Leader for Slovenia] RightHand .NET consulting & development www.rthand.com Blog: http://cs.rthand.com/blogs/blog_with_righthand/ "Chris" <ckarc***@cs.utexas.edu> wrote in message news:ebi0rb$2of$1@geraldo.cc.utexas.edu... > I'm wanting to build a custom update statement that only sets the fields > that have been changed. > > I supposed that I could always get the DiffGram XML, then compare the > before and after fields by hand. I was just hoping there was a better > way... > > Miha Markic [MVP C#] wrote: >> Hi Chris, >> >> No, there is no support for this out of the box. >> Why do you need such feature? >> |
|||||||||||||||||||||||