Internals of DataSet.GetChanges needed!

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
 
D

David Adams

problem solved. I was setting the currencymanger to the tables instead of
the datarelations.
 

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