C# - Need to find instances of SQL Server on client - 06-20-2007 , 07:00 AM
How can I determine using C# which instances of SQL Server 2000,
MSDE, 2005 or 2005 Express, if any, are installed on a client
For instance, by knowing the computer's name, I could
guess at a named instance of the data provider and use
it in a connection string, assuming Windows Integrated
Security, and attempt a connection. But this is klutzy.
Is there a method of *discovery* that returns the info?
In Visual Studio 2003/2005 when attempting a new connection
in Server Explorer, an applet appears which does something
like this. Ditto in SQL Server Manager.
The intent is to use DDL, embedded in ADO.Net library
calls, to create a data schema for an application
with stored procedures. This part is easy. But first,
I need to know "who's" there.
RE: C# - Need to find instances of SQL Server on client - 06-20-2007 , 12:57 PM
This enum in C# can help you.