2

I would like to list what instances of SQL 2005 Server (Express Editon) are installed on local or remote machine (my app is in Native C++). I found that i can make it by SQLDMO, however it seems that SQLDMO does not see SQL 2005 Express Edition and call to ListAvailableSqlServers returns empty list.

How can i make it? Playing with system registry is an extreme solution and applies only for local machines.

4

2 回答 2

1

明白了... 找到 SQLBrowseConnect。答案在 MSDN 中与往常一样 :-)

于 2009-05-05T19:16:00.987 回答
0

您可以尝试SqlDataSourceEnumerator.GetDataSources()。在 C# 和 VB.Net 中运行良好,虽然我没有在 C++ 中尝试过。

于 2009-05-05T16:46:14.450 回答