DataRelations defined for DataSet but not showing up.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a DataSet with 14 DataTables and 18 Relationships that were defined
within Visual Studio .NET 2003. Everything looks OK in the visual development
environment, i.e. when I preview the DataSet all the relationship appear
correctly defined. However, when I create a new DataSet of this type within
my project I only see two of the DataRelations in the DataSet.Relations
collection. I don't know where else to look to trouble shoot the problem. Any
suggestions.

The following code will show only two of the 14 relationships defined:

dsMaster ds = new dsMaster();

foreach( DataRelation drel in ds.Relations )
Console.WriteLine( drel.RelationName + ": " + drel.ParentTable + " ->
" + drel.ChildTable );

Thanks for assisting me on this issue.
 
Fleckman,

Can you post the XSD file that is generated for the dataset? Can you
see the relations in there? Also, you might want to show all files in your
project, and check the code that is generated for the data set.

Hope this helps.
 
Back
Top