On 9/25/08, Usman <[EMAIL PROTECTED]> wrote:
>
>
> use SqlDataSourceEnumerator Class to enumerate through all the Sql
> Servers on Network
> /*some times this class does not picks up its own SqlServer name so we
> have used Enviroment.MachineName*/
> SqlDataSourceEnumerator ServerEnumerator =
> SqlDataSourceEnumerator.Instance;
> DataTable ServerTable = ServerEnumerator.GetDataSources();
> //ServerTable.Rows.Add(ServerTable.NewRow()[0] =
> Environment.MachineName);
> string MachinNm = Dns.GetHostName();
> foreach (DataRow row in ServerTable.Rows)
> {
>
> cbx_ServerList.Items.Add(row["ServerName"].ToString());
> }
>
> >
> dot massage
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web
Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://cm.megasolutions.net/forums/default.aspx
-~----------~----~----~----~------~----~------~--~---