473,399 Members | 4,254 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,399 software developers and data experts.

Join tables in a dataset

Bob Ross
119 100+
Is there a way to to create a single table from multiple tables in a dataset?

I currently have a dataset with multiple tables and and relations connecting those tables.
Table1 has many records to each record in Table2. I would like to create a new table which is effectively Table2 INNER JOIN Table1.
Is there an easy way to achieve this?

Or am I just going to have to manually create a new datatable and cycle through each record in Table 2 using GetParentRow to grab values from Table1 and manually build each row to populate it with?


I am using VB.Net (.Net version 2) to create a web application.
Apr 23 '08 #1
5 4471
shweta123
692 Expert 512MB
Hi,

Please refer this Article

Is there a way to to create a single table from multiple tables in a dataset?

I currently have a dataset with multiple tables and and relations connecting those tables.
Table1 has many records to each record in Table2. I would like to create a new table which is effectively Table2 INNER JOIN Table1.
Is there an easy way to achieve this?

Or am I just going to have to manually create a new datatable and cycle through each record in Table 2 using GetParentRow to grab values from Table1 and manually build each row to populate it with?


I am using VB.Net (.Net version 2) to create a web application.
Apr 23 '08 #2
Bob Ross
119 100+
Hi,

Please refer this Article
This link doesn't work for me.
Apr 23 '08 #3
Bob Ross
119 100+
I have managed to get access to the page using a proxy website. No idea why i can't get through to it. Oh well.

Thanks very much Shweta. Thats does exactly what I want.

Just out of interest In the article it uses this syntax -
DatasetName.Tables!TableName

I have never come across this syntax before. I would always use
DatasetName.Tables("TableName")

What is the difference between the two? Where can you use the ! (exclamation mark)?

Sorry but I can't find any info through google on the syntax.
Apr 23 '08 #4
shweta123
692 Expert 512MB
Hi,

One can use both the syntax to access the tablename property.


I have managed to get access to the page using a proxy website. No idea why i can't get through to it. Oh well.

Thanks very much Shweta. Thats does exactly what I want.

Just out of interest In the article it uses this syntax -
DatasetName.Tables!TableName

I have never come across this syntax before. I would always use
DatasetName.Tables("TableName")

What is the difference between the two? Where can you use the ! (exclamation mark)?

Sorry but I can't find any info through google on the syntax.
Apr 23 '08 #5
Bob Ross
119 100+
Okay thanks but I was looking for a little more detail than that. I managed to work that much out on my own.

I want to know - where else it can be used? What is the advantages/disadvantages? Where can I find more information on it?
Apr 24 '08 #6

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

Similar topics

3
by: Peter | last post by:
Hi, I have two datatables and I want to efficiently query the intersection of the two using the studentID. In my example code below, I want to print out Mary and Jane and their exam grades and I...
0
by: Gareth Stretch | last post by:
Hi Guys. i am using C#.net connecting to an Access database using OleDbConnection i am using the following select Statement to join 3 tables string strdvds = "SELECT dvd.name,...
0
by: Sky | last post by:
Hello: Have a nagging question about creating disconnected DataSet queries... If you have a table called INodes of 10,000 records, and a Table called Clients of again 10,000 and a table called...
2
by: Bennett Haselton | last post by:
I know how to create a DataAdapter that loads data from a data source into a table in a typed DataSet, and how to set the DataSource and DataMember properties of a DataGrid so that at run time it...
1
by: Gene Ariani | last post by:
I have one dataset that contains two DataTables: DataTable1: Customer_ID 1
4
by: DraguVaso | last post by:
Hi, For my VB.NET application I have the following situation: 2 tables on my SQL Server: tblAccounts and tblRules. For each Account there are many Rules (so tblRules is linked to my tblAccounts...
2
by: clickon | last post by:
DataSet relationships seem to be focussed on one to many type realtionships. I have got a one to one realtionship in a DataSet between two tables. I can't do a join between the two tables in the...
0
by: =?Utf-8?B?UHVjY2E=?= | last post by:
Hi, I'm using vs2005 and .net 2.0. I have used 2 DirectorySearchers to retrieve Active Directory data and put them into 2 separate dataset tables. I want to create a 3rd dataset table by using the...
2
by: =?Utf-8?B?UHVjY2E=?= | last post by:
Hi, I'm using vs2005 and .net 2.0 I used 2 DirectorySearchers to retrieve data from Active Directory and placed them in 2 dataset tables. I need to perform the SQL equuvakebt of join operation to...
0
by: katupilar | last post by:
I am writing a tool to interface with a couple of tables in SQL Server 2000. I usually write my queries with an Inner Join to bring in fields from seperate tables and load that to a DataSet. I'm...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.