Results 1 to 4 of 4

Thread: DataRelation

  1. #1

    Thread Starter
    Hyperactive Member wasiq's Avatar
    Join Date
    Jan 2000
    Location
    Karachi, Sindh, Pakistan
    Posts
    274

    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?

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083

  3. #3
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690
    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.

  4. #4

    Thread Starter
    Hyperactive Member wasiq's Avatar
    Join Date
    Jan 2000
    Location
    Karachi, Sindh, Pakistan
    Posts
    274
    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
  •  



Click Here to Expand Forum to Full Width