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
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