473,513 Members | 2,493 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to use Dataset with multi tables ?

Hi Everybody
I have three tables USERS, ROLES and GROUPS in a SQL Server. As you can
guess, I am using these tables to check permissions. Now I converted these
SQl tables into XML tables and put them into roles.xml and created an
roles.xsd with PK's and FK's. For testing I can load this file into a
Dataset and then display the tables into three different DataGrids as DS(0),
DS(1) and DS(2). Now I
want to get one table based on the combination of these three tables. In The
SQL Server i would use the following command :

SELECT * FROM TABLE1, TABLE2, TABLE3 WHERE TABLE1.ID = TABLE2.ID AND
TABLE1.GROUPID = TABLE3.GROUPID

How to get the same with XML ?
So how can I combine the tables DS.Tables("users"), DS.Tables("roles"),
DS.Tables("groups") ?

Thanks in advance
Raja

Nov 18 '05 #1
1 1075
have a look at the merge function of the dataset

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"Ing. Rajesh Kumar" <iambad(Without This)@post.cz> wrote in message
news:ub**************@TK2MSFTNGP10.phx.gbl...
Hi Everybody
I have three tables USERS, ROLES and GROUPS in a SQL Server. As you can
guess, I am using these tables to check permissions. Now I converted these
SQl tables into XML tables and put them into roles.xml and created an
roles.xsd with PK's and FK's. For testing I can load this file into a
Dataset and then display the tables into three different DataGrids as
DS(0),
DS(1) and DS(2). Now I
want to get one table based on the combination of these three tables. In
The
SQL Server i would use the following command :

SELECT * FROM TABLE1, TABLE2, TABLE3 WHERE TABLE1.ID = TABLE2.ID AND
TABLE1.GROUPID = TABLE3.GROUPID

How to get the same with XML ?
So how can I combine the tables DS.Tables("users"), DS.Tables("roles"),
DS.Tables("groups") ?

Thanks in advance
Raja


Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2530
by: Diego TERCERO | last post by:
Hi... I'm working on a tool for editing text resources for a family of software product my company produces. These text resources are found in a SQL Server database, in a table called...
7
1293
by: pei_world | last post by:
the following codes are error occurs. basically, I set a breakpoint at BuildingTN, I trace it, and it come up my intended table, but when I run the program, in my component cobInside, it always...
5
4653
by: Trond | last post by:
I have a webservice that is returning a dataset. In dataset there is a table with 4 columns. (LDate, LTime, LDepth and ServiceNumber) I then try to read only 2 of the columns into array (double...
1
2883
by: Maziar Aflatoun | last post by:
Hi, I have a multi-level complex XML that I like to process and store in the database. I'm comfortable with using DataSet and then reading the tables (XML is parsed into 7 tables in my case) and...
10
1438
by: Rich | last post by:
Hello, I have to read and write around one million records from an external data source to Sql Server2k every night. That's a lot of I/O. I am using VB6 for this (takes hours). I am...
10
27820
by: Bernie Yaeger | last post by:
I have a need to add a primary key to a dataset/datatable. How can this be done using a standard oledb data provider? Tx for any help.
3
1176
by: BrianDH | last post by:
Hi I have a form with multi-tabs, and on each tab I have a one combo that has the same values. I populate all 3 combo with the same one datacall/dataset My problem is: when I make a value...
0
1415
by: Ohad Weiss | last post by:
Hi all, I've once asked about that topic. but didn't get an answer. I have a dataset based on 4 tables, which have relation between them. The main table presented to the user on textboxes...
5
3477
by: Simon Woods | last post by:
Hi Does anyone know if there any dotnet software out there which converts a dataset into a collection of custom objects, programmatically i.e. actually creates the class structure and collection...
0
7384
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
7539
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
7525
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5686
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
4746
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3234
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1596
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
802
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
456
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.