Groups | Blog | Home
all groups > sql server odbc > july 2003 >

sql server odbc : Enumerate SQL Servers


Frank Cheng
7/11/2003 12:59:25 PM
Hi all,

I would like to get a list of SQL servers installed in the network,
just like the the combo box you see in MS SQL Server Manager.
I tried using NetServerEnum, but it only returns the name of the computer
that has SQL Server installed, not the name of the SQL Server itself.
There is one interesting function in sqlsvc.dll called QSQLEnumerateServers,
that seems like what I need, but I can't find any kind of documentation on
it.

Thanks in advance,

Frank Cheng

Brannon Jones
7/14/2003 11:07:01 AM
Check out SQLBrowseConnect(). That is the documented method of enumerating
servers on the network.

Don't use undocumented functions like QSQLEnumerateServers. They can change
without notice.

[quoted text, click to view]

AddThis Social Bookmark Button