Reputation: 673
Im using c# .net windows application form. I have created many databases with many tables in each.
I have a datagrid view and a display button.
when i click on this button, the system must prompt me to enter the server name and after typing the server name, it should display all the databases related to that server in some combo box. and again if i select a database it should show all the tables present in that database into a combobox. and if i select a table, it should prompt an option to select only required columns into the datagridview. How can i do this?
Upvotes: 0
Views: 232
Reputation: 10015
Have a look at the SMO library (http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.management.smo.database.aspx) to get yourself started. It can do everything you mention.
Upvotes: 0
Reputation: 62157
It is called "programming". Basically you write a program that connects to the server, findds out what database exists, fills the combobox etc. I think you get the idea?
You really expect us here to provide you with the complete code for that?
Upvotes: 2