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.
Cindy ChenPosted Jun 7, 2010, 1:00 PM
Hi, Fred: When I used the class souce code in my test window program. The results (Server list in my network) is not consistant (sometimes found 8 server, sometimes found 2, and sometimes 0). Do you know why? thanks a lot, Cindy