DataRelation Error. No default member found for type

Discussion in 'ASP .Net' started by mazda_88, Jun 7, 2004.

  1. mazda_88

    mazda_88 Guest

    I have a number of tables inside a dataset. I have a repeater that I
    need to bind to. The data that is needed resides in two tables in the
    dataset.
    Here is the code that I'm using:

    Dim rel_Bridesmaid As DataRelation
    rel_Bridesmaid = New DataRelation("BridemaidOrder", _
    _ds_Bridesmaid.Tables(Bridesmaid_DATA.PERSON_TABLE).Columns(Bridesmaid_DATA.PERSON_ID_FIELD),
    _
    _ds_Bridesmaid.Tables(Bridesmaid_DATA.BRIDESMAIDORDER_TABLE).Columns(Bridesmaid_DATA.PERSON_ID_FIELD))

    _ds_Bridesmaid.Relations.Add(rel_Bridesmaid)

    rp_Bridesmaid.DataSource = _ds_Bridesmaid.Relations
    rp_Bridesmaid.DataBind()

    I checked to make sure that data in the PERSON_ID_FIELD exists in both
    tables. When I run the program it errors out on the DataBind. This
    is the error message that I receive:

    Exception Details: System.MissingMemberException: No default member
    found for type 'DataRelation'.

    The above code was pretty much copied from Wrox Chapter 8, page 400.

    Any ideas what the problem is. Also, can a dataset have only one
    relation. If not how does one identify which relations to bind to.

    Thanks,
    mazda_88, Jun 7, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andy Eshtry
    Replies:
    2
    Views:
    4,306
    Teemu Keiski
    Feb 14, 2004
  2. =?Utf-8?B?VGltOjouLg==?=

    Error: No default member found???

    =?Utf-8?B?VGltOjouLg==?=, Jul 8, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    622
    Teemu Keiski
    Jul 8, 2004
  3. Marco Ippolito
    Replies:
    0
    Views:
    2,575
    Marco Ippolito
    Oct 11, 2004
  4. Andy Eshtry

    Error: No default member found for type MyClass

    Andy Eshtry, Feb 13, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    196
    Andy Eshtry
    Feb 13, 2004
  5. Rob
    Replies:
    1
    Views:
    212
Loading...

Share This Page