Home All Groups Group Topic Archive Search About

Listing Sql Server Instances

Author
11 Jan 2007 4:15 PM
Cleyton
I have an application that lists Sql instances on the network.
In my case, I just use MSDE instances listed.

The code is:

DbProviderFactory factory =
DbProviderFactories.GetFactory("System.Data.SqlClient");
if (factory.CanCreateDataSourceEnumerator)
{
                DataRowCollection dr =
factory.CreateDataSourceEnumerator().GetDataSources().Rows;
}

But, this code only lists MSDE instances in machines that don't have Sql
Server Express 2005 installed.


What's happening? Does anybody knows?
Thanks!

AddThis Social Bookmark Button