473,386 Members | 1,698 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,386 software developers and data experts.

Relationship in Dataset

Hello

could you tell me pls what would be the select statment to relate two tables
in a Dataset; Or do I have to create two select commands for the tables and
then create the reationship in the Dataset!!!? (How?)
Thank U.
--
Regads,
Rochdi
Nov 21 '05 #1
4 1072
Look at the SQL "Join" statement. That may do what you need.

"John" <Jo**@discussions.microsoft.com> wrote in message
news:5E**********************************@microsof t.com...
Hello

could you tell me pls what would be the select statment to relate two
tables
in a Dataset; Or do I have to create two select commands for the tables
and
then create the reationship in the Dataset!!!? (How?)
Thank U.
--
Regads,
Rochdi

Nov 21 '05 #2
John,
could you tell me pls what would be the select statment to relate two
tables
in a Dataset; Or do I have to create two select commands for the tables
and
then create the reationship in the Dataset!!!? (How?)

Exactly

See this sample

http://www.windowsformsdatagridhelp....7-7bc3068aca2c

I hope this helps,

Cor
Nov 21 '05 #3
Thanks for the link you supplied, Cor Ligthert.

Could you tell me more about the format of the string that used as the
second parameter of function Control.SetDataBinding(param1, param2)?

Thanks,

Kai
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
John,
could you tell me pls what would be the select statment to relate two
tables
in a Dataset; Or do I have to create two select commands for the tables
and
then create the reationship in the Dataset!!!? (How?)

Exactly

See this sample

http://www.windowsformsdatagridhelp....7-7bc3068aca2c

I hope this helps,

Cor

Nov 21 '05 #4
Kai,
Could you tell me more about the format of the string that used as the
second parameter of function Control.SetDataBinding(param1, param2)?

I did not see that in the sample, however probably are you talking about the
datamember as it is in the relation.

Cor
Nov 21 '05 #5

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

Similar topics

0
by: Juan | last post by:
I built a form with two datagrid representing a master-detal relationship, everything works fine except fot the first row inserted in the dataset (in the detail table), it is not displayed after...
0
by: Me | last post by:
Hi, I have a dataset with two tables (Order, Item) and a relationship setup to join the tables. I have the nested property of the DataRelation class set to true. When I use the GetXML method...
2
by: Json | last post by:
Ok, brand new to SQLXML 3.0 and its various issues. Heres what I'm trying to do: 1. I am trying to load xml data into an empty SQL table from my .NET console application. 2. This isn't a huge...
4
by: niv | last post by:
Hi, I am unsure on how to retrieve data from tables 2 tables that are related through a relationship table.. TableOne -------- TableOneID TableOneDesc
2
by: Abhishek Srivastava | last post by:
Hello All, Suppose if I have a SQL query like select p.ID, p.NAME, p.UNIT_PRICE, o.QUANTITY from PRODUCT p ORDERS o where p.ID = X AND P.ID = O.ID Here one product can have many orders....
0
by: nima | last post by:
Hi I have two tables in my database. PRODUCT and PRODUCT_GROUP. PRODUCT has a foreign key to PRODUCT_GROUP. I generated a typed dataset using VS.net and added a relationship between the two...
8
by: Christopher Weaver | last post by:
I'm having the hardest time doing the simplest thing. I have a DataGrid bound to a table in a master detail DataRelation within a DataSet relTaskActivities = new DataRelation("TaskActivities",...
1
by: bitwxtadpl | last post by:
-First I add and relate the tables A and B. Create a new instance of TableA Add TableA to DataSetX Create a new instance of TableB Add TableB to DataSetX Create a relation between TableA and...
0
by: Joey Lee | last post by:
Hi, I have created a dataset schema(*.xsd) which contain two element "InvoiceHeader" and "InvoiceDetail". I set the primary key of both the element. for example "InvoiceHeader" -> id and...
2
by: Rararachel | last post by:
Hi All, (Have posted this elsewhere, so apologies to anyone who's seen this behemoth before!) I have a simple, but surprisingly complicated database requirement in that the database requires...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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...

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.