468,769 Members | 1,978 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,769 developers. It's quick & easy.

[C#] Selecting From a DataSet with multiple DataTables

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

Jul 2 '08 #1
0 1291

Post your reply

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

Similar topics

3 posts views Thread by Alex Ayzin | last post: by
reply views Thread by | last post: by
reply views Thread by John Bailey | last post: by
11 posts views Thread by Ron L | last post: by
6 posts views Thread by Jumping Matt Flash | last post: by
7 posts views Thread by samoore33 | last post: by
9 posts views Thread by =?Utf-8?B?RGljaw==?= | last post: by
1 post views Thread by csharpula csharp | last post: by
1 post views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.