DataRelation Error. No default member found for type

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,
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top