1 <?xml version="1.0" encoding="utf-8"?>
2 <Type Name="SqlDataSourceEnumerator" FullName="System.Data.Sql.SqlDataSourceEnumerator">
3 <TypeSignature Language="C#" Value="public sealed class SqlDataSourceEnumerator : System.Data.Common.DbDataSourceEnumerator" />
5 <AssemblyName>System.Data</AssemblyName>
6 <AssemblyVersion>2.0.0.0</AssemblyVersion>
9 <BaseTypeName>System.Data.Common.DbDataSourceEnumerator</BaseTypeName>
13 <since version=".NET 2.0" />
15 <attribution license="cc4" from="Microsoft" modified="false" />
16 <para>Both SQL Server 2000 and SQL Server 2005 make it possible for applications to determine the existence of SQL Server instances within the current network. The <see cref="T:System.Data.Sql.SqlDataSourceEnumerator" /> class exposes this information to the application developer, providing a <see cref="T:System.Data.DataTable" /> containing information about all the available servers. This returned table contains a list of server instances that matches the list provided when a user attempts to create a new connection, and on the <paramref name="Connection Properties" /> dialog box, expands the drop-down list containing all the available servers.</para>
19 <attribution license="cc4" from="Microsoft" modified="false" />
20 <para>Provides a mechanism for enumerating all available instances of SQL Server within the local network.</para>
24 <Member MemberName="GetDataSources">
25 <MemberSignature Language="C#" Value="public override System.Data.DataTable GetDataSources ();" />
26 <MemberType>Method</MemberType>
28 <ReturnType>System.Data.DataTable</ReturnType>
32 <returns>To be added.</returns>
33 <since version=".NET 2.0" />
35 <attribution license="cc4" from="Microsoft" modified="false" />
36 <para>The table returned by this method contains the following columns, all of which contain strings:</para>
44 <para>Description</para>
50 <para>ServerName</para>
53 <para>Name of the server.</para>
58 <para>InstanceName</para>
61 <para>Name of the server instance. Blank if the server is running as the default instance.</para>
66 <para>IsClustered</para>
69 <para>Indicates whether the server is part of a cluster.</para>
77 <para>Version of the server (8.00.x for SQL Server 2000, and 9.00.x for SQL Server 2005).</para>
81 <block subset="none" type="note">
82 <para>Due to the nature of the mechanism used by <see cref="T:System.Data.Sql.SqlDataSourceEnumerator" /> to locate data sources on a network, the method will not always return a complete list of the available servers, and the list might not be the same on every call. If you plan to use this function to let users select a server from a list, make sure that you always also supply an option to type in a name that is not in the list, in case the server enumeration does not return all the available servers. In addition, this method may take a significant amount of time to execute, so be careful about calling it when performance is critical.</para>
86 <attribution license="cc4" from="Microsoft" modified="false" />
87 <para>Retrieves a <see cref="T:System.Data.DataTable" /> containing information about all visible SQL Server 2000 or SQL Server 2005 instances.</para>
91 <AssemblyVersion>2.0.0.0</AssemblyVersion>
94 <Member MemberName="Instance">
95 <MemberSignature Language="C#" Value="public static System.Data.Sql.SqlDataSourceEnumerator Instance { get; }" />
96 <MemberType>Property</MemberType>
98 <ReturnType>System.Data.Sql.SqlDataSourceEnumerator</ReturnType>
101 <value>To be added.</value>
102 <since version=".NET 2.0" />
104 <attribution license="cc4" from="Microsoft" modified="false" />
105 <para>The <see cref="T:System.Data.Sql.SqlDataSourceEnumerator" /> class does not provide a constructor. Use the <see cref="P:System.Data.Sql.SqlDataSourceEnumerator.Instance" /> property to retrieve an instance of the class instead.</para>
108 <attribution license="cc4" from="Microsoft" modified="false" />
109 <para>Gets an instance of the <see cref="T:System.Data.Sql.SqlDataSourceEnumerator" />, which can be used to retrieve information about available SQL Server instances.</para>
113 <AssemblyVersion>2.0.0.0</AssemblyVersion>