Or, without calling into a COM component, the framework exposes The
DbDataSourceEnumeratorclass. The example in help shows how to use it.
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no
rights.
__________________________________
"Miha Markic [MVP C#]" <miha at rthand com> wrote in message
Hi,
The simpliest way:
Add reference to COM object SQLDMO and use this code:
SQLDMO.Application app = new SQLDMO.Application();
SQLDMO.NameList list =
app.ListAvailableSQLServers();
foreach (string name in list)
{
// your servers
}
--
Miha Markic [MVP C#] - RightHand .NET consulting & development
www.rthand.com
Blog:
http://cs.rthand.com/blogs/blog_with_righthand/
SLODUG - Slovene Developer Users Group
www.codezone-si.info
Hello from FRANCE
I use VS 2005 beta 2 and Sql server 2005.
How Can I retreive all the SQL server on my LAN ?
Thanks
Olivier