Home All Groups Group Topic Archive Search About

Use of DataRelation is locking rows in DataTables

Author
2 Feb 2006 5:49 PM
dice
I am using a DataSet generated using VS2003 .xsd files direct from db tables.

I then add some DataRelations to the DataSet programatically.

I am running into the following problem:
any time I call GetChildRows() using a particular DataRelation the parent
column becomes ReadOnly.
All subsequent attempts to edit the parent column are now throwing
ReadOnlyException and the only way I have found to clear it is to remove the
DataRelation from DataSet.Relations - (and later add it again when I next
want to do a lookup).

I guess I am somehow missing part of the picture - what should I be doing to
avoid this problem and what is causing it?

Author
3 Feb 2006 11:30 AM
dice
Doh - I should be using GetParentRows - child and parent tables were swopped.

AddThis Social Bookmark Button