Anybody know how to get a list of available SQL Servers, the same list that the SQL Server Service Manager does?
Printable View
Anybody know how to get a list of available SQL Servers, the same list that the SQL Server Service Manager does?
I've found this way, if anybody is interested:
It uses the "Microsoft SQLDMO Object Library" as a reference.Code:Dim objSQLApp As SQLDMO.Application
Set objSQLApp = New SQLDMO.Application
Dim iServerEnum As Integer
For iServerEnum = 1 To objSQLApp.ListAvailableSQLServers.Count
cboServer.AddItem objSQLApp.ListAvailableSQLServers(iServerEnum)
Next