Click here to Skip to main content
16,017,922 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to populate my grid from two tables with different columns/datatype in both tables.
I have 2 Datasets. Both have different table structure (columns/datatype are different in both tables).
I tried to merge both datasets, but it wasn't working.

Any help is appreciated.
Posted
Updated 6-Jan-11 18:08pm
v2
Comments
Sunasara Imdadhusen 7-Jan-11 0:08am    
You can merge tables with single dataset.
Rohit.Net100 7-Jan-11 0:19am    
i tried to merge but, my grid displays data only from 1st dataset.
Kasson 7-Jan-11 0:22am    
BTW can you post your code we will check it and help you .
Prerak Patel 7-Jan-11 2:36am    
It would really help if you add code to your question.

Rohit,

Dataset itself contain 1 or more tables. So I think you want to join tables in a dataset.

Here you're stating that you want to join datasets(group of one or more then one table), So There will be join between many tables.

Can you please show us your table structure ?

There's a good answer HERE[^] Brain simulator on joining two tables without database access if they contains some key to join with.

Hope it helps.
 
Share this answer
 
Comments
Sandeep Mewara 7-Jan-11 3:58am    
No idea, who are graying our answers! :doh:
Not sure, what did not work. All you need is to Create a third dataset and first create columns of first one into it and then second one into it. After which, loops through and add the data.

Alternatively, try DataSet.Merge method[^] if you can have close schema if not same.

One more suggestion, why not make a Join query and get data in a single shot in a table? Why two different queries and tables?
 
Share this answer
 
Comments
Sandesh M Patil 7-Jan-11 3:55am    
good suggestion
Sandesh M Patil 7-Jan-11 3:56am    
buddy you are near to 1 lakh repo point. Best of luck ;)
Hiren solanki 7-Jan-11 4:00am    
I think we need to help each other to make it in blue again. +5.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900