473,320 Members | 1,921 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

[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

Stefan
Jul 2 '08 #1
0 1504

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

Similar topics

3
by: Alex Ayzin | last post by:
Hi, I have a problem that might be easy to solve(possibly, I've just overlooked an easy solution). Here we go: I have a dataset with 2 datatables in it. Now, I need to do the following: if...
3
by: Bill C. | last post by:
Hi, I've got a simple console app that just reads an XML file into a DataSet then prints out a description of each table in the DataSet, including column names and row values for each column. ...
0
by: | last post by:
Hi, I have an app that uses a typed dataset to persist user data. The dataset has a multiple tables with multiple table relations. The problem I am running into is that the user data is...
0
by: John Bailey | last post by:
I have a dataset with multiple data tables. I need to bind this to a wizard interface, where each portion of the wizard udates the information in one of the datatables. I am using formviews in...
11
by: Ron L | last post by:
I have a data table that lists a series of items in my database. In my user form, I want the user to be able to filter by a number of criteria (e.g. location, contract, date modified, etc). Other...
6
by: Jumping Matt Flash | last post by:
The code i'm writing is using VB .NET and is for a web service returning a dataset, which is in turn to be used by an ASP .NET application displaying a datagrid. I'm currently populating a...
7
by: samoore33 | last post by:
I want to list all of the items in a dataset in a textbox. The dataset has multiple tables. When I try to use the code below, even though I dim myState as the DataTable("state"). It still looks for...
9
by: =?Utf-8?B?RGljaw==?= | last post by:
I have a function that creates a DataSet, populates its many DataTables and then returns the DataSet. I want to bind separate controls to each of the DataSet's DataTables, e.g. a separate...
1
by: csharpula csharp | last post by:
Hello, Could you please tell me the difference between DataSet and DataTable? Thank u! *** Sent via Developersdex http://www.developersdex.com ***
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.