update datatable in a dataset in ADO.NET 2.0

I have an application in VS2005 winforms C#.
I have a dataset with a datatable. I updated some records in the datatable. (not add just update)
I want to create a collection of these changed records . I would also like to see some examples on this issue.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Guy Hengel [angelIII / a3]Billing EngineerCommented:
check out the Dataset.GetChanges method, which returns a DataSet with only those rows that have changes:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial

  Try this....

private void UpdateDataSet(DataSet myDataSet){

   DataSet xDataSet;

//To get modified row only
      xDataSet = myDataSet.GetChanges(DataRowState.Modified);

      // Insert code to resolve errors.

ANAT2403Author Commented:
It doesnot work.
I have a dataset and a datatable dt1.
I create a new datatable dt2 :  dt2 = new dt1();
I edit and change a record in dt2.
The command   myDataSet.HasChanges(DataRowState.Modified) return false.
Hoe do I do it?
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Guy Hengel [angelIII / a3]Billing EngineerCommented:
>I edit and change a record in dt2.
ANAT2403Author Commented:
     this is how:  
   DataRow dr;
            dr = dt2.Rows.Find(keyIDStr);
            dr["ManufacturerID"] = ChangedValue;
Guy Hengel [angelIII / a3]Billing EngineerCommented:
>The command   myDataSet.HasChanges(DataRowState.Modified) return false.
actually, the method HasChanges returns a DataSet, and not a boolean?!
ANAT2403Author Commented:
I am looking for command on a datatable or a view about the changes. not command on the dataset.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.