Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Currently am working in asp.net in that i get confuse how to get tree structure table name with columns from selected Database.
Eg:

Tablename1
columnname1
columnname2
columnname3
Table2
columnname1
columnname2
columnname3

Can any one help me how to achieve this?
Posted
Comments
Rockstar_ 3-Jun-13 5:34am    
Could you please elaborate ur question ?
KarthickInfosys 3-Jun-13 5:43am    
I have created a database in MSSQLSERVER namely Sample and i created tables namely employee details,employee salary,employee experiences

From this i want to show values like this
employee details
empno
empname
empDOB
status
employee salary
empno
emp CTC
emp basic
emp PF
employee experiences
empno
empyearofexperience
empfromdate
emptodate






Rockstar_ 3-Jun-13 5:44am    
you can get these details in sql also?
Rockstar_ 3-Jun-13 5:47am    
But not in tree structure..
Rockstar_ 3-Jun-13 5:48am    
select * from INFORMATION_SCHEMA.COLUMNS

Instead of * , select the required column.

1 solution

Hi,


Bind the database query out to the tree view, please look at the sample below..


http://asp-net-example.blogspot.in/2008/10/treeview-example-how-to-use-treeview.html[^]
 
Share this answer
 
Comments
KarthickInfosys 3-Jun-13 6:24am    
The tree view is ok but i need sql query to fetch the table names and column in that table
and show it in Tree structure
Rockstar_ 3-Jun-13 6:26am    
First u get all the table names

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