Hi
I am a newbie for vb.net. I am trying to related two tables in a DataSet. I have looked through a lot of threads but could not find the answer I want. Say, I have two tables:
table1 : "ID", "ID in table 2"
1 3
2 4
table2 : "ID", "other inf "
1 a
2 b
3 c
4 d
The second field in table1 connect these two tables together.
I know what to do up to the step for building the relation between them.
My question is:
1.After relation setup, what is the syntax for get a certain item from table2, if "ID" in table 1 is given. For example, given ID= 2 in the table 1 , I want to get the output "other inf "= d.
2. Will it be less effective if I directly code this function without using dataset relation, such as:
search "ID=2" in table 1-> get 4 -> search "ID=4" in table 2 with -> get result d
I have seen an example in the forum, but the operation is on items. So I still need the syntax for items
Thank you very much!
I am a newbie for vb.net. I am trying to related two tables in a DataSet. I have looked through a lot of threads but could not find the answer I want. Say, I have two tables:
table1 : "ID", "ID in table 2"
1 3
2 4
table2 : "ID", "other inf "
1 a
2 b
3 c
4 d
The second field in table1 connect these two tables together.
I know what to do up to the step for building the relation between them.
My question is:
1.After relation setup, what is the syntax for get a certain item from table2, if "ID" in table 1 is given. For example, given ID= 2 in the table 1 , I want to get the output "other inf "= d.
2. Will it be less effective if I directly code this function without using dataset relation, such as:
search "ID=2" in table 1-> get 4 -> search "ID=4" in table 2 with -> get result d
I have seen an example in the forum, but the operation is on items. So I still need the syntax for items
Thank you very much!