Possible Duplicate:
How to list available instances of SQL Servers using SMO in C#?
I'm writing a quick application which is to present the user with a list of server names/instances he or she may choose from to connect to an SQL Server database. Basically I am trying to populate these options into a combobox, which should have options similar to these:
- (local)
- Joe-PC\SQLEXPRESS
- etc.
I have successfully obtained the databases corresponding to a server, and their respective tables, through ADO.NET. However, I cannot find any code samples which allow me to retrieve the above data.