Click here to Skip to main content
15,940,430 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
consider this..
there are two tables..
first one..name,faculty,year
second one..name,regno.
I need to view this two tables in a single gridview Like this..
name,faculty,year,regno..
give me an answer please.
I am a beginner for C#.
Posted
Comments
Mohd. Mukhtar 28-Nov-12 6:58am    
Is there any relation between two table?

In Dataset you can keep multiple tables. So use it like ds.table[0] or ds.table[1] as required
 
Share this answer
 
Hi Nishan,

Try with below query. Here I am assuming both the that have name as common column.

SQL
SELECT t1.Name,t1.Faculty,t1.Year,t2.RegNo FROM table1 t1, table2 t2 WHERE t1.Name = t2.Name;
 
Share this answer
 

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