By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,857 Members | 1,835 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,857 IT Pros & Developers. It's quick & easy.

[C#] Selecting From a DataSet with multiple DataTables

P: 17
Hi Guys

Is there any way in c# (or vb.net) to extract a datatable of data from a dataset with multiple datatables which has relationships set up (containing combined data from the datatables)?

I currently have 2 datatables in the dataset. The first one contains the header records with columns such as Id, DateCreated, DateModified, etc

The second datatable contains the detail records and has columns such as Id, BatchId (which links to the first tables Id column), Name, Surname.

Is there a way I can run a select statement on the dataset to extract data? For example if I want the BatchId, DateCreated, Name and Surname of all record related to the header table with Id 1?

I'm sure there has to be a way (why else are you able to set up relations on the datatables?) so I just need a push in the right direction.

Thanks in advance

Stefan
Jul 2 '08 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.