|
-
Dec 30th, 2003, 03:18 PM
#1
Thread Starter
Hyperactive Member
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?
-
Dec 30th, 2003, 03:41 PM
#2
Sleep mode
-
Dec 30th, 2003, 03:45 PM
#3
Frenzied Member
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.
-
Dec 31st, 2003, 02:28 PM
#4
Thread Starter
Hyperactive Member
Thanks alot
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|