database name extracting and table retrievel
ASP.NET
1
Posts
1
Posters
0
Views
1
Watching
-
in my application i have one textbox ,button and a drop down box.when i am clicking the button it will browse the database and will appear in the text box.i have done that.now what i want is,to fetch the database tables from the browsed database and to list in the dropdown box. the query for that is
select table_name, column_name, data_type, character_maximum_length, is_nullable from information_schema.columns where table_name in (select name from sysobjects where xtype='U') order by table_name
but i want the c# code for that.where do i put this query?