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
Ken Tucker [MVP] - 13 Dec 2005 23:16 GMT
Hi,
You can get a list of sql severs from the registry
http://www.vb-tips.com/default.aspx?ID=02624fd2-5f9f-4c36-8218-089d31e2f8ff
List databases
http://www.vb-tips.com/default.aspx?ID=2dc619da-3c51-473a-8d50-f64cb0d2b77a
Ken
-----------------
> 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
[quoted text clipped - 38 lines]
>
> Dean Slindee
dgk - 14 Dec 2005 13:28 GMT
>Hi,
>
[quoted text clipped - 11 lines]
>> using a COM object? If not, does anyone know where to find SQLDMO? Here
>> is the code previously used:
...
Interesting errors on those sites this morning. Seems to me that I've
seen this on my own projects upon occasion:
Compiler Error Message: BC31011: Unable to load referenced library
'c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net
files\root\4e785e54\fb7bf60\assembly\dl2\ee58f759\7f543ea3_9128c501\mywebhome.dll':
Access is denied.