M
mazda_88
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,
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,