Home All Groups Group Topic Archive Search About

Get modified colums only

Author
10 Aug 2006 9:46 PM
Chris Karcher
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?

Author
11 Aug 2006 5:27 AM
Cor Ligthert [MVP]
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?
Author
11 Aug 2006 8:07 AM
Miha Markic [MVP C#]
Hi Chris,

No, there is no support for this out of the box.
Why do you need such feature?

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

Show quote
"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?
Author
11 Aug 2006 1:31 PM
Chris
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?
>
Author
11 Aug 2006 3:51 PM
Jim Hughes
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?
>>
Author
12 Aug 2006 7:52 AM
Miha Markic [MVP C#]
You can still build it manually - loop through all rows and compare column
original vs current value if you need to.

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

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?
>>

AddThis Social Bookmark Button