ArrayList arrSqlServer = new ArrayList();
SQLDMO.ApplicationClass oApp = new SQLDMO.ApplicationClass();
try
{
SQLDMO.NameList sList = oApp.ListAvailableSQLServers();
if (sList != null)
{
for (int i = 1; i <= sList.Count; i++)
arrSqlServer.Add(sList.Item(i));
}
}
finally
{
oApp = null;
}