After installing Windows Server 2003 SP1, my project no longer has a valid
reference to SQLDMO. I was using it to get a list of valid SQL Servers on
the network. Perhaps there is now a better way to do that, rather than
using a COM object? If not, does anyone know where to find SQLDMO? Here is
the code previously used:
Public Sub FindDatabase()
Dim index As Integer
Dim sqlApp As New SQLDMO.Application
Dim sqlNames As SQLDMO.NameList
'check local machine for database
booConnected = BuildConnectionStringSQLServer(strServerName, c_CatalogName,
strUserName, strUserPassword)
'pc attached to network?
booNetworkAttached = IsNetworkAvailable()
If booNetworkAttached = True Then
strIPAddress = GetIPAddress()
sqlNames = sqlApp.ListAvailableSQLServers
For index = 0 To sqlNames.Count - 1 'sqlNames is 1 based(COM)
strServerNames(index) = sqlNames.Item(index + 1)
Next
End If
End Sub
Thanks,
Dean Slindee