Populate SQL Servers and Databases dynamically in C#

The attached source code is a class that provides methods to populate an array with the available SQL Server and databases on your network dynamically.
 
The GetServer() method returns SQL Servers available on the network. This method requires no parameters.
 
The GetCatalogs(string SQLServer, string UserName, string Password) method returns the list of databases available on a SQL Server passed as the first parameter of the method.
 
See attached code for more details.
 


Similar Articles