Click here to Skip to main content
12,447,343 members (55,751 online)
Click here to Skip to main content
Add your own
alternative version

Stats

125.8K views
4.6K downloads
13 bookmarked
Posted

List SQL Servers on a Network

, 10 Mar 2002 CPOL
Rate this:
Please Sign up or sign in to vote.
An activeX DLL which lists any active SQL servers on your local network

Introduction

This is just something that I needed for a recent application and thought that others may find it useful.

The problem was to enumerate all available SQL Servers on a local network. I decided that the easiest way to do this was to create a VB activeX DLL which could then be referenced by whatever needed to use it (I've tested it in .NET, VB and ASP).

I'm not going to provide a code walkthrough with this, but I've included the VB project and compiled DLL in the source code zip, plus there's a very simple VB application which shows its use.

Essentially it works by making an API call to the netApi32 library (the function it uses is NetServerEnum).

When I have some more time, I will update this article with a full explanation of the code. For now however, things should work pretty much "out of the box", and will hopefully be useful to some of you.

Any problems, then just let me know.

History

  • 10th March, 2002: Initial post

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Torsten Mauz
Web Developer
United Kingdom United Kingdom
No Biography provided

You may also be interested in...

Pro
Pro

Comments and Discussions

 
QuestionHow i can do it at c#? Pin
blud0ff18-Oct-05 4:04
memberblud0ff18-Oct-05 4:04 
GeneralAnother (maybe simpeler?) approach Pin
Rogier Reedijk12-Mar-02 1:29
memberRogier Reedijk12-Mar-02 1:29 
GeneralRe: Another (maybe simpeler?) approach Pin
mostevil21-May-02 2:12
membermostevil21-May-02 2:12 
GeneralRe: Another (maybe simpeler?) approach Pin
Rogier Reedijk22-May-02 1:36
memberRogier Reedijk22-May-02 1:36 
GeneralRe: Another (maybe simpeler?) approach Pin
Pettys10-Jul-02 11:00
memberPettys10-Jul-02 11:00 
GeneralRe: Another (maybe simpeler?) approach Pin
Anonymous27-May-03 21:46
sussAnonymous27-May-03 21:46 
GeneralRe: Another (maybe simpeler?) approach Pin
Torsten Mauz29-May-03 0:20
memberTorsten Mauz29-May-03 0:20 
GeneralRe: Another (maybe simpeler?) approach Pin
haberdasher16-Jul-03 6:02
memberhaberdasher16-Jul-03 6:02 
GeneralRe: Another (maybe simpeler?) approach Pin
Phil Jeary21-Jun-04 0:06
memberPhil Jeary21-Jun-04 0:06 
GeneralRe: Another (maybe simpeler?) approach - in VB.Net Pin
zjerry7-Oct-04 5:57
memberzjerry7-Oct-04 5:57 
GeneralRe: Thanks! Pin
Lantric21-Nov-04 2:58
memberLantric21-Nov-04 2:58 
GeneralRe: Another (maybe simpeler?) approach - in VB.Net Pin
Anonymous7-Apr-05 23:12
sussAnonymous7-Apr-05 23:12 
GeneralRe: Another (maybe simpeler?) approach - in VB.Net Pin
Frank Esser25-Aug-05 10:26
memberFrank Esser25-Aug-05 10:26 
QuestionRe: Another (maybe simpeler?) approach - in VB.Net Pin
rugbygeek15-Feb-06 10:00
memberrugbygeek15-Feb-06 10:00 
AnswerRe: Another (maybe simpeler?) approach - in VB.Net Pin
Polymorpher13-Jun-06 3:44
memberPolymorpher13-Jun-06 3:44 
GeneralRe: Another (maybe simpeler?) approach - in VB.Net Pin
Lokanatha Reddy16-Jan-07 19:56
memberLokanatha Reddy16-Jan-07 19:56 
GeneralRe: Another (maybe simpeler?) approach - in VB.Net Pin
Polymorpher13-Jun-06 3:41
memberPolymorpher13-Jun-06 3:41 
GeneralRe: Another (maybe simpeler?) approach - in VB.Net Pin
Lokanatha Reddy22-Jan-07 0:53
memberLokanatha Reddy22-Jan-07 0:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160811.3 | Last Updated 11 Mar 2002
Article Copyright 2002 by Torsten Mauz
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid