Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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 let's 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

....

 

 

'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 :rolleyes:

 

matej

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...