Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / June 2006

Tip: Looking for answers? Try searching our database.

Master/Detail sample?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kevin Burton - 22 Jun 2006 18:16 GMT
I was working with the sample given for master detail and so far I have:

           ' Bind the master data connector to the Manual Order table.
           _masterBindingSource.DataSource = _dsManualOrder
           _masterBindingSource.DataMember =
_dsManualOrder.dtManualOrderItem.TableName

           ' Bind the details (order discount) data connector to the master
           ' data connector, using the DataRelation name to filter the
           ' information in the details table based on the current row
           ' in the master table.
           _detailsBindingSource.DataSource = _masterBindingSource
           _detailsBindingSource.DataMember =
_dsManualOrder.dtManualOrderItemDiscount.TableName

The problem is when I set the DataMember for the details (last step above) I
get an exception:

Message = "DataMember property 'dtManualOrderItemDiscount' cannot be found
on the DataSource."

I created some debug code to see what tables were available and:

           For Each dt As DataTable In _dsManualOrder.Tables
               Debug.WriteLine(dt.TableName)
           Next

Yields:

dtManualOrderItem
dtManualOrderItemDiscount

So I guess I am confused as to why the table is not found.

Kevin
Thor Kornbrek - 23 Jun 2006 17:16 GMT
Change this line to read.

_masterBindingSource.DataMember = "dtManualOrderItem"

I hope that helps.
Signature

Thor Kornbrek
.Net Developer
http://www.geekguild.net

> I was working with the sample given for master detail and so far I have:
>
[quoted text clipped - 31 lines]
>
> Kevin
Kevin Burton - 23 Jun 2006 18:02 GMT
Thank you for your response. The TableName was/is set to the string that you
specified. I think I found the problem though. When I specify the detail
DataSource as the BindingSource for the master I specified a DataMember that
was a table name and it should be the DataSet name.

Kevin

> Change this line to read.
>
[quoted text clipped - 37 lines]
> >
> > Kevin

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.