473,466 Members | 1,336 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to reteive data amongst defferent datatables

Hi,

I created a dataset that contains several datatables. I'd like to know how
to query data from these tables, like table join in sql?

thanks in advance
Nov 21 '05 #1
8 1372
Li,

You cannot set a join on those tables, a dataset is not a database, however
you can set datarelations.

I hope this helps,

Cor
Nov 21 '05 #2
Cor Ligthert,

If there is a datarelation between the tables, can I get data concurrently
from the tables?

"Cor Ligthert [MVP]" wrote:
Li,

You cannot set a join on those tables, a dataset is not a database, however
you can set datarelations.

I hope this helps,

Cor

Nov 21 '05 #3
Li,

If there is a datarelation you can get any information from a parent and a
child.

http://msdn.microsoft.com/library/de...classtopic.asp

(However be aware AFAIK will not all databinding result in that what you
want. It gives back datarows and datarowcollections, not
datatable.defaultview by instance).

I hope this helps,

Cor
Nov 21 '05 #4
Thanks Cor Ligthert,

I know how to create a datarelationship. What I want to know is how to
retreiving data amongst the datatables between them there is already a
datarelationship. Shoul I go through row by row or I can create a dataview
and get at once?

http://eupmcchzugdev01.eu.pm.com:208.../WebForm1.aspx

"Cor Ligthert [MVP]" wrote:
Li,

If there is a datarelation you can get any information from a parent and a
child.

http://msdn.microsoft.com/library/de...classtopic.asp

(However be aware AFAIK will not all databinding result in that what you
want. It gives back datarows and datarowcollections, not
datatable.defaultview by instance).

I hope this helps,

Cor

Nov 21 '05 #5
Li,

You can in a datarow by instance to get the childrows

http://msdn.microsoft.com/library/de...drowstopic.asp

However as using the parentrow getting related rows and much more of that..

http://msdn.microsoft.com/library/de...trowstopic.asp

As I said, I am not lucky in using the dataview in combination with this.
(Maybe it can by creating a new table from the rows, however that I never
tried)

Cor
Nov 21 '05 #6
Li,
In addition to the other comments.

Although a DataSet does not support Joins directly, You can create a
JoinView as defined in the following KB article:

http://support.microsoft.com/kb/325682/EN-US/

Also once you define one or more DataRelation objects on your DataSet you
can use GetChildRows & GetParentRow & GetParentRows to get the rows for a
given relationship on a given DataRow.

Hope this helps
Jay

"Li Pang" <Li****@discussions.microsoft.com> wrote in message
news:26**********************************@microsof t.com...
| Hi,
|
| I created a dataset that contains several datatables. I'd like to know how
| to query data from these tables, like table join in sql?
|
| thanks in advance
Nov 21 '05 #7
On Thu, 1 Sep 2005 08:54:17 -0700, "Li Pang"
<Li****@discussions.microsoft.com> wrote:
Hi,

I created a dataset that contains several datatables. I'd like to know how
to query data from these tables, like table join in sql?

thanks in advance


I've recently completed a series of projects that will do exactly what
you're asking for. It will allow you to execute SQL select statements
(with join syntax) to query tables in a DataSet

Joining ADO.Net DataTables:
http://home.hot.rr.com/graye/Article...TableJoins.htm
In-Memory SQL Engine:
http://home.hot.rr.com/graye/Articles/SQL_Engine.htm
Nov 21 '05 #8
On Thu, 1 Sep 2005 08:54:17 -0700, "Li Pang"
<Li****@discussions.microsoft.com> wrote:
Hi,

I created a dataset that contains several datatables. I'd like to know how
to query data from these tables, like table join in sql?

thanks in advance


I've recently completed a series of projects that will do exactly what
you're asking for. It will allow you to execute SQL select statements
(with join syntax) to query tables in a DataSet

Joining ADO.Net DataTables:
http://home.hot.rr.com/graye/Article...TableJoins.htm
In-Memory SQL Engine:
http://home.hot.rr.com/graye/Articles/SQL_Engine.htm
Nov 21 '05 #9

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

Similar topics

6
by: Tippy G | last post by:
My name is Glenn, I am an experienced VB5.0/6.0 programmer who is starting a new project using VB.NET. The project is simple but will be using a .mdb file for storing of data. Only one person...
3
by: Simon Harvey | last post by:
Hi, In my application I get lots of different sorts of information from databases. As such, a lot of information is stored in DataSets and DataTable objects. Up until now, I have been passing...
2
by: Wee Bubba | last post by:
2 questions please: 1. At the moment I make a connection to a database whenever a user logs into my website. I run a few SQL's then store some commonly used dataTables in session objects for...
13
by: Leszek Taratuta | last post by:
Hello, I have several drop-down lists on my ASP.NET page. I need to keep data sources of these lists in Session State. What would be the most effective method to serialize this kind of data...
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...
9
by: Anil Gupte | last post by:
After reading a tutorial and fiddling, I finally got this to work. I can now put two tables created with a DataTable class into a DataRelation. Phew! And it works! Dim tblSliceInfo As New...
0
by: smiley123 | last post by:
i have table with blob as type for one of the columns i need to retreive its data through java.help me out
1
by: biolie1984 | last post by:
Plz Help me guys... I want to delete a record from defferent tables e.g. tb1 is a parent table tb2 , tb3 , tb3 are a child table then if i want to delete the parent the record from...
0
by: StefanPienaar | last post by:
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)? ...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
1
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
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
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...
0
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
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.