Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > DataRelation Error. No default member found for type

Reply
Thread Tools

DataRelation Error. No default member found for type

 
 
mazda_88
Guest
Posts: n/a
 
      06-07-2004
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.BRIDESMAIDOR DER_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,
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataRelation on Multible layers of DataRelations =?Utf-8?B?SSBhbSBTYW0=?= ASP .Net 3 03-06-2005 04:29 AM
No default member found for type "myClass" error, please help Rob ASP .Net Datagrid Control 1 01-14-2005 02:23 PM
Many-to-many relationship / DataSet / child rows / DataRelation / sorting / navigation Marco Ippolito ASP .Net 0 10-11-2004 04:11 PM
Error: No default member found for type MyClass Andy Eshtry ASP .Net 2 02-14-2004 03:12 PM
Error: No default member found for type MyClass Andy Eshtry ASP .Net Datagrid Control 0 02-13-2004 11:54 PM



Advertisments