>> local SQLExpresss list

J

Jonathan

Hi, using the following I can list all SQL servers on the network ....

Public Function GetAllSqlServerCollection(colSqlServers As Collection) As
Boolean
Dim intIndex As Integer
Dim oApplication As Object
Dim oNameList As Object

Set oApplication = New SQLDMO.Application
With oApplication
Set oNameList = .ListAvailableSQLServers
With oNameList
For intIndex = 1 To .Count
colSqlServers.Add (oNameList.Item(intIndex))
Debug.Print oNameList.Item(intIndex)
Next
End With
End With
Set oApplication = Nothing
GetAllSqlServerCollection = True
End Function

However the local MsSQLExpress server is not included in the list. What do I
need to include MSSQLExpress in the returned list?

Any ideas or suggestions appreciated :)

Many thanks,
Jonathan
 
Top