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.

2 Answers2

1

Got it... Found SQLBrowseConnect. Answer is as usual in MSDN :-)

0

You can try SqlDataSourceEnumerator.GetDataSources(). Works well in C# and VB.Net though I haven't tried it from C++.

Jeremy
  • 6,580
  • 2
  • 25
  • 33
  • Thanks. I checked that method but it is available since .NET 2.0 and this version of framework is unreachable to me. I work with VS2003. –  May 05 '09 at 17:05