Internals of DataSet.GetChanges needed!

  • Thread starter Thread starter David Adams
  • Start date Start date
D

David Adams

Hi,

I have a typed DataSet with several parent-child relationships that include
identity values for primary keys. DataRelations are also set for Update and
Delete (Cascade) and Accept/Reject (None). When I update the DataSet with a
SqlDataAdapter.Update, the SQL database has the correct records
inserted/updated, but certain records don't get the identity values cascaded
back, the 2nd row in a table is somehow copied into the first row (causing a
constraint violation). However, simply creating a new dataset with a
ds.GetChanges() and using the resultant dataset with the DataAdapter.Update
works fine.

What I need to know is what exactly is going on with the
DataSet.GetChanges() method? I know that it copies the added, modified, and
deleted rows while maintaining the rowstate, but what else happens? I think
knowing this will help me pinpoint what is wrong with the original dataset.

Thanks,

David Adams
 
problem solved. I was setting the currencymanger to the tables instead of
the datarelations.
 
Back
Top