Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21192

Please Help Finding All Database servers in a local network

$
0
0
I searched the internet and found the following code:
Code:

Dim ss As SQLDMO.Application
    Dim nm As NameList
    Set ss = SQLDMO.Application
    Set nm = ss.ListAvailableSQLServers
    For lc = 1 To nm.Count
        cmbDBs.AddItem nm.Item(lc)
    Next

It just gives the list of some sql 2000 servers and my local sql server 2008 instance. But when I use the microsoft ado data control's properties and select database, I find that there are many more servers than the ones in the above code. Why I am not able to get all these using the above code?

Viewing all articles
Browse latest Browse all 21192

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>