473,796 Members | 2,765 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

displaying SQL server list

Hi,
I'd like to display list of all MS SQL servers which are available on
the network
(I write application which uses database located on one of the machines in
my LAN). Has anyone got any idea what to do in order to obtain list of all
such servers?!

When you open Sql Service Manager (for sql server2000) you've got such list.

Thanks,

Piotrek
Nov 16 '05 #1
1 2480
Hi Piotrei Stachowicz,

You can use enumeration. There is a good example, i somehow extract it.

public enum ServerType : uint
{
/// <summary>
/// All workstations
/// </summary>
SV_TYPE_WORKSTA TION = 0x00000001,
/// <summary>
/// All computers that have the server service running
/// </summary>
SV_TYPE_SERVER = 0x00000002,
/// <summary>
/// Any server running Microsoft SQL Server
/// </summary>
SV_TYPE_SQLSERV ER = 0x00000004,
/// <summary>
/// Primary domain controller
/// </summary>
SV_TYPE_DOMAIN_ CTRL = 0x00000008,
/// <summary>
/// Backup domain controller
/// </summary>
SV_TYPE_DOMAIN_ BAKCTRL = 0x00000010,
/// <summary>
/// Server running the Timesource service
/// </summary>
SV_TYPE_TIME_SO URCE = 0x00000020,
/// <summary>
/// Apple File Protocol servers
/// </summary>
SV_TYPE_AFP = 0x00000040,
/// <summary>
/// Novell servers
/// </summary>
SV_TYPE_NOVELL = 0x00000080,
/// <summary>
/// LAN Manager 2.x domain member
/// </summary>
SV_TYPE_DOMAIN_ MEMBER = 0x00000100,
/// <summary>
/// Server sharing print queue
/// </summary>
SV_TYPE_PRINTQ_ SERVER = 0x00000200,
/// <summary>
/// Server running dial-in service
/// </summary>
SV_TYPE_DIALIN_ SERVER = 0x00000400,
/// <summary>
/// Xenix server
/// </summary>
SV_TYPE_XENIX_S ERVER = 0x00000800,
/// <summary>
/// Windows NT workstation or server
/// </summary>
SV_TYPE_NT = 0x00001000,
/// <summary>
/// Server running Windows for Workgroups
/// </summary>
SV_TYPE_WFW = 0x00002000,
/// <summary>
/// Microsoft File and Print for NetWare
/// </summary>
SV_TYPE_SERVER_ MFPN = 0x00004000,
/// <summary>
/// Server that is not a domain controller
/// </summary>
SV_TYPE_SERVER_ NT = 0x00008000,
/// <summary>
/// Server that can run the browser service
/// </summary>
SV_TYPE_POTENTI AL_BROWSER = 0x00010000,
/// <summary>
/// Server running a browser service as backup
/// </summary>
SV_TYPE_BACKUP_ BROWSER = 0x00020000,
/// <summary>
/// Server running the master browser service
/// </summary>
SV_TYPE_MASTER_ BROWSER = 0x00040000,
/// <summary>
/// Server running the domain master browser
/// </summary>
SV_TYPE_DOMAIN_ MASTER = 0x00080000,
/// <summary>
/// Windows 95 or later
/// </summary>
SV_TYPE_WINDOWS = 0x00400000,
/// <summary>
/// Root of a DFS tree
/// </summary>
SV_TYPE_DFS = 0x00800000,
/// <summary>
/// Terminal Server
/// </summary>
SV_TYPE_TERMINA LSERVER = 0x02000000,
/// <summary>
/// Server clusters available in the domain
/// </summary>
SV_TYPE_CLUSTER _NT = 0x01000000,
/// <summary>
/// Cluster virtual servers available in the domain
/// (Not supported for Windows 2000/NT)
/// </summary>
SV_TYPE_CLUSTER _VS_NT = 0x04000000,
/// <summary>
/// IBM DSS (Directory and Security Services) or equivalent
/// </summary>
SV_TYPE_DCE = 0x10000000,
/// <summary>
/// Return list for alternate transport
/// </summary>
SV_TYPE_ALTERNA TE_XPORT = 0x20000000,
/// <summary>
/// Return local list only
/// </summary>
SV_TYPE_LOCAL_L IST_ONLY = 0x40000000,
/// <summary>
/// Lists available domains
/// </summary>
SV_TYPE_DOMAIN_ ENUM = 0x80000000
}

For more info how to implement it:
http://codeproject.com/csharp/CompPickerLib.asp

Hope it helps you.
--
Regards,
Chua Wen Ching :)
"Piotrek Stachowicz" wrote:
Hi,
I'd like to display list of all MS SQL servers which are available on
the network
(I write application which uses database located on one of the machines in
my LAN). Has anyone got any idea what to do in order to obtain list of all
such servers?!

When you open Sql Service Manager (for sql server2000) you've got such list.

Thanks,

Piotrek

Nov 16 '05 #2

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

Similar topics

8
5799
by: euang | last post by:
Hi, I have been using access 2000 for two years on WINDOWS NT to display dynamic aweb page using ASP My ISP has now changed to Windows 2003, and I am having major problems displaying information from MEMO fields within the Access 2000 database. I have not had any problems before displaying MEMO fields on NT and have tried various tips to resolve this issue but no luck so far. I was wondering if anyone had come accross a similar...
3
1327
by: Deepa | last post by:
Hi Am doing a web app which has a datagrid with template columns. One of the columns has dropdowns for each row. I also have the EditCommandColumn. The problem am facing is I just see the last value of the dataset for the dropdowns(in the non-edit mode). and moreover its just showing it as a label instead of a dropdown. But once I click the Edit button, its displaying the dropdowns with all dataset values. Here is the code for my...
1
2272
by: Yoshitha | last post by:
hi I have datalist control in my ASP.NET application the problem here is i have used a textbox with multiline true propertly when i enter data like "fdjsfhjksdhfjsdfhsdjhfsdfhsdjfhsd jfdsjfksdjfksdjkfjsdfjksdjfsdjfd fdsfhjsdhfjsdhfjf dsjf dsjfhjsdfhjksdh d fdsjf hsdjkfhdjsfhsdjfh ds
2
4364
by: RAJ | last post by:
In our multi-tier application, we have several ASP.NET user controls which will update the same data source provided by middle tier logic. In this particular scenario we have one user control displaying the contents of the data source, whilst another control updates the datasource via a command buttons implementation of 'Click', an event raised in the 'Handle Postback Events' stage of the control execution life cycle (via the...
3
1182
by: GeekyChicky79 | last post by:
Hi Everyone, I have the project below where I'm pulling out information from 1 table "Subjects", pulling the Subjects, and SubjectCode. The Subjects are displaying in the Combo Box just fine, but I can not get the corresponding Subject Code to display in the Label. I have 2 Data adapters/dataset,1 for Subjects, and the other for SubjectCode, along with a Data View setup.
8
18092
by: Greg Lyles | last post by:
Hi all, I'm trying to develop an ASP.NET 2.0 website and am running into some real problems with what I thought would be a relatively simple thing to do. In a nutshell, I'm stuck on trying to display data in a "GridView" which is tied to an "ObjectDataSource". In turn, this ObjectDatasource gets it's data from a strongly-typed business object within my code.
4
2513
by: Drew | last post by:
I posted this to the asp.db group, but it doesn't look like there is much activity on there, also I noticed that there are a bunch of posts on here pertaining to database and asp. Sorry for cross-posting. I am trying to build a "checklist", where a user can navigate to an ASP page on the intranet which shows a list of "questions" that the user can check off. I am trying to figure out how to do this so that it is scalable, but I am...
0
1200
by: arunpulikkan | last post by:
hi,guys im new to asp.in my option list one value is displaying twice.following is the code if not rs1.eof then thispagesForm = rs1(0) sql2 = "select formname, local_url from xwhere formid = "& thispagesForm set rs2 = conn.execute(sql2) thispagesFormName = rs2(0) local_url = rs2(1)
7
6673
by: RichB | last post by:
I am trying to get to grips with the asp.net ajaxcontrol toolkit, and am trying to add a tabbed control to the page. I have no problems within the aspx file, and can dynamically manipulate a tabcontainer which has 1 panel already, however I want to try create the TabPanels dynamically. I followed the advice here: http://www.asp.net/learn/ajax-videos/video-156.aspx (3rd comment - Joe Stagner)
0
9685
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10242
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10021
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9061
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7558
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5453
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4127
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.