GetChanges from a DataTable into a DataSet???

A

Aaron Lind

Is there a good way to get the changes only from a single datatable.
I am using a typed dataset that holds four tables. I would like to
get the changes only from one of them. If I use the
ds."mytable".GetChanges it returns an instance of the datatable. Is
there a good way to get that table into an empty instance of the
dataset?? The ds."mytable" is read only. The best way I have found
is to get all the changes ds.GetChanges and then to clear the rows of
the other tables. I was hoping there was a better way. Basically
because of business rules I want all of these tables in the same
dataset but this one particular table has its own update statement.

Thanks for any help on the matter.

AJL
 
E

Eric Barr

In the past i have done something like :


myNewDS.Merge( myTypedDS.SomeTable.GetChanges() )

Hope that helps.
-eric
 

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