Get modified colums only

C

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

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
 
M

Miha Markic [MVP C#]

Hi Chris,

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

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...
 
J

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
 
M

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top