shanemay
asked on
Fill a dataset with multiple linked tables.
I have a database with events, each event has multiple organizers and multiple classifications. I am wondering the best manner in which to fill a dataset with the data so I can map the dataset to my event class. Any advice would be greatly appreciated.
A little framework - I have a eventID that is a foreign key in two tables one that contains organizerID and the other that contains a classificationID. I can easly query the database three times and get the data. Is that the best way? Or is it possible to get all the data in a single dataset?
A little framework - I have a eventID that is a foreign key in two tables one that contains organizerID and the other that contains a classificationID. I can easly query the database three times and get the data. Is that the best way? Or is it possible to get all the data in a single dataset?
Hi
bellow url give some information
http://www.vbdotnetheaven.com/UploadFile/prvn_131971/MultiTablesViewData11162005071604AM/MultiTablesViewData.aspx
bellow url give some information
http://www.vbdotnetheaven.com/UploadFile/prvn_131971/MultiTablesViewData11162005071604AM/MultiTablesViewData.aspx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you for the responses. I think I might be on the correct path. However,
Filling the dataset in one sql statement is what I am doing currently, then I have a DataMap method that maps the data from the dataset into the Event Class. However, with all the data contained in a single dataset, the logic is rather complex to ensure that the correct contributorIDs and classificationIDs are mapped into ArrayLists. Because all the data is in the same dataset multiple copies of the data must be sorted and discarded. Is there a better way to map the data?
Filling the dataset in one sql statement is what I am doing currently, then I have a DataMap method that maps the data from the dataset into the Event Class. However, with all the data contained in a single dataset, the logic is rather complex to ensure that the correct contributorIDs and classificationIDs are mapped into ArrayLists. Because all the data is in the same dataset multiple copies of the data must be sorted and discarded. Is there a better way to map the data?
ASKER
Thank you for your comments, time, and consideration on my behalf.
ASKER
Open in new window