473,395 Members | 1,460 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Get a list of sql servers, is .ServerName deprecated?

http://www.sqldbatips.com/showarticle.asp?ID=45

the tutorial I am looking at.

I copied the last method. and I am using the following references

using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using System.Data;
using Microsoft.Win32;
using Microsoft.SqlServer.Management;
using Microsoft.SqlServer.Management.Smo;
using Microsoft.SqlServer.Management.Smo.RegisteredServe rs;
using Microsoft.SqlServer.Server;
using System.Windows.Forms;

the problem is here...

....
foreach (RegisteredServer rs in rsvrs)
{
String name = "";

name = rs.ServerName.Replace...

there is no method called ServerName.

There is ServerInstance and Name, but not ServerName . am I missing an
assembly or reference? is ServerName deprecated ? thanks.
Mar 5 '07 #1
1 2011
roger_27 wrote:
http://www.sqldbatips.com/showarticle.asp?ID=45

the tutorial I am looking at.

I copied the last method. and I am using the following references

using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using System.Data;
using Microsoft.Win32;
using Microsoft.SqlServer.Management;
using Microsoft.SqlServer.Management.Smo;
using Microsoft.SqlServer.Management.Smo.RegisteredServe rs;
using Microsoft.SqlServer.Server;
using System.Windows.Forms;

the problem is here...

...
foreach (RegisteredServer rs in rsvrs)
{
String name = "";

name = rs.ServerName.Replace...

there is no method called ServerName.

There is ServerInstance and Name, but not ServerName . am I missing an
assembly or reference? is ServerName deprecated ? thanks.

Try reading this the SQLDMO is what you want to be using.

http://www.csharphelp.com/archives2/archive342.html
--
Regards JJ (UWA)
Mar 5 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Anakim Border | last post by:
App servers such as quixote, webware and skunkweb (just to name a few) offer a clean environment to develop Python webapps. I have some problems, however, understanding their security model. My...
2
by: Vikram | last post by:
Hi, Is it possible to write a Stored Procedure which can update the data from one SQL Server to another SQL Server ? I know its possible through DTS, but want to know if its possible using a...
6
by: Reza Alirezaei | last post by:
How can I have a list of all sql servers avaiable on our LAN populated in a DropDownList exacly like what we have when we want to specify Datasource in ADO.Net or wherever? Thanks
3
by: Steve | last post by:
Hi all How would i get a list of all Active Computers on a network? All I need are the computer names. Kind Regards, Steve.
1
by: Roger | last post by:
I would like to get a list of machines on my network (Workstations and/or Servers). Is there a way to do this in VB.Net? Thanks, Rog
1
by: Bilge TUTAK | last post by:
Hi, I want to find the list of the computer names in a workgroup or in a domain. Is there a way to do this in VB.NET? Thanx
1
by: gnusmsa | last post by:
ASP.NET 2.0 (C#) application Using Windows authentication and impersonation Windows Server 2003 (IIS6) Server is a member server on a domain Logged into server as a domain user that is in the...
27
by: comp.lang.tcl | last post by:
My TCL proc, XML_GET_ALL_ELEMENT_ATTRS, is supposed to convert an XML file into a TCL list as follows: attr1 {val1} attr2 {val2} ... attrN {valN} This is the TCL code that does this: set...
2
by: querry | last post by:
Hi all, I am trying to get a list of all the available sql servers and then populate them in a combo box. I do this with the following code taken from...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.