c# - Populate Treeview with SQL Databases and its Tables -


how populate treeview checkboxes databases , tables in server using c# wpf application?

 -server 1----------------       -        - database1     - -          -- table1     - -          -- table2     - -          -- table3     - -        - database2     - -          -- table1     - -          -- table2     - -          -- table3     - -------------------------- 

you need firstly return list of databases useful.

select name master..sysdatabases name not in ('master', 'tempdb', 'model', 'msdb'); 

then each database list of tables

select * information_schema.tables 

then find examples of how populate treeviews in wpf.

maybe one

then ...... write code!


Comments