I have two tables in dataset:
PhoneBill
-phonenumber
-cost
-duration
.....
and
PhoneBook
-phonenumber
-surname_name
All I want to do, is actually a RIGHT JOIN between tables on phonenumber field.
I Can Not Use SQL server or anything else, so lets try to do this on dataset level.
I want to join this tables. So in Datagrid I want to display:
-phonenumber
-surename_name (if exists in phonebook)
-duration
-cost
....
tx in advance
matej
PhoneBill
-phonenumber
-cost
-duration
.....
and
PhoneBook
-phonenumber
-surname_name
All I want to do, is actually a RIGHT JOIN between tables on phonenumber field.
I Can Not Use SQL server or anything else, so lets try to do this on dataset level.
I want to join this tables. So in Datagrid I want to display:
-phonenumber
-surename_name (if exists in phonebook)
-duration
-cost
....
Code:
I made a relation between tables in dataset
ds.Relations.Add("PhoneBill_PhoneBook", ds.Tables("PhoneBill").Columns("phonenumber"), ds.Tables("phonebook").Columns("phonenumber"), False)
the problem is, that I do not know how to display wanted data in one row:
Me.DataGrid1.DataSource = ds.Tables("MainData")
in this case there are displayed all records from phonebill, but there the column name_surname is displayed lower as a child table.
tx in advance
matej