-
DataRelation
I have two different tables in a dataset. What I am trying to do is define a relationship between them using the following line of code.
Code:
DS.Relations.Add("myRelation", DS.Tables(Table1).Columns(Column1), DS.Tables(Table2).Columns(Column2))
It works fine if both the tables have corresponding parent child records but gives an error if the parent has a few records missing. and therefore doesnt create the relation. Is there another way of tackling this problem?
-
-
I think I understand what you're saying, but what is the problem? You can't create a relationship if the data voids that relationship.
I guess one could loop through the child records and insert into the parent if the column does not exist, then create the relationship, but then the relationship would seem a little dirty.
-