Hi,
I need to list out tables in a entire Sql server(local network). How can i do it c#.net.
Regards,
k.kishore
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Mike GoldPosted Mar 7, 2007, 6:51 PM
http://www.c-sharpcorner.com/UploadFile/mgold/Query2Excel12032005011029AM/Query2Excel.aspx
Basically you'll need to connect with a SqlAdapter, fill a dataset with tables you are interested in and loop through each data row in the tables in the dataset. You'll need to do multiple fills if you want to fill the same dataset. This will require you changing the CommandText of the adapter on the fly to handle a query for each table (see http://www.developer.com/db/article.php/3311341
-Mike