By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,641 Members | 1,446 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,641 IT Pros & Developers. It's quick & easy.

dataset relate it

P: n/a
JFB
Hi Folks,
I have two tables in one dataset customers and orders.
If I select a customer form a combo box, how can I set the where statement
for the orders table?
I want to display all the orders for that particular customerID in dynamic
way.
Any samples??
Tks for you help.
JFB

Nov 20 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
There are hundreds of northwind examples on using data relations within the
dot net framework.
"JFB" <jf*****@directvinternet.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi Folks,
I have two tables in one dataset customers and orders.
If I select a customer form a combo box, how can I set the where statement
for the orders table?
I want to display all the orders for that particular customerID in dynamic
way.
Any samples??
Tks for you help.
JFB

Nov 20 '05 #2

P: n/a
Sorry... I'm trying to be nicer about it... I realize that was a little
harsh, my bad...

Alright, what you want to learn about is called Data relations within .NET

specifically, your looking to learn ADO.NET (which is way different, and yet
very simliar to ADO 2.7/8)

The cool thing about the designer (and this ONLY works in windows forms) is
the ability to "walk" the relationship chain, that is, when you define a
relationship within your dataset, the MDE can interpret that relationship
and create dynamic binding for you with you writing absolutly no code.

If you look at PlanetSourceCode.com or devx, or the MSDN library, search for
anything to do with the Northwind database, there are so many examples of
how to do relationships its not even funny. But it is a wonderful tool.

Your question regarding the Where clause.. you don't set that in your
dataset, you set that in your data adapter... A dataset is a representation
of disconnected data (unlike ADO pre.net which used stateful connections).
It updates the database through DataAdapters which execute your actual SQL
statements. it's a lot of fun to learn about, but there is a LOT of
information there..

be sure to check out the microsoft adonet newsgroup as well.

HTH
-CJ
"JFB" <jf*****@directvinternet.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi Folks,
I have two tables in one dataset customers and orders.
If I select a customer form a combo box, how can I set the where statement
for the orders table?
I want to display all the orders for that particular customerID in dynamic
way.
Any samples??
Tks for you help.
JFB

Nov 20 '05 #3

P: n/a
Cor
Hi JFB,.

Have a look at "datarelation"

http://msdn.microsoft.com/library/de...classtopic.asp
I hope this helps,

Cor
Nov 20 '05 #4

P: n/a
JFB
Cool Cor... tks...

"Cor" <no*@non.com> wrote in message
news:Ou**************@tk2msftngp13.phx.gbl...
Hi JFB,.

Have a look at "datarelation"

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

I hope this helps,

Cor

Nov 20 '05 #5

P: n/a
Here I go giving a nice detailed explanation to help a user understand...
And Cor gets the credit as usual. =)

Don't make me call you "Nick"

=)
"Cor" <no*@non.com> wrote in message
news:Ou**************@tk2msftngp13.phx.gbl...
Hi JFB,.

Have a look at "datarelation"

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

I hope this helps,

Cor

Nov 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.