Click here to Skip to main content
Click here to Skip to main content

List SQL Servers on a Network

, 10 Mar 2002
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

Comments and Discussions

 
QuestionHow i can do it at c#? Pinmemberblud0ff18-Oct-05 4:04 
GeneralAnother (maybe simpeler?) approach PinmemberRogier Reedijk12-Mar-02 1:29 
GeneralRe: Another (maybe simpeler?) approach Pinmembermostevil21-May-02 2:12 
GeneralRe: Another (maybe simpeler?) approach PinmemberRogier Reedijk22-May-02 1:36 
GeneralRe: Another (maybe simpeler?) approach PinmemberPettys10-Jul-02 11:00 
GeneralRe: Another (maybe simpeler?) approach PinsussAnonymous27-May-03 21:46 
GeneralRe: Another (maybe simpeler?) approach PinmemberTorsten Mauz29-May-03 0:20 
GeneralRe: Another (maybe simpeler?) approach Pinmemberhaberdasher16-Jul-03 6:02 
GeneralRe: Another (maybe simpeler?) approach PinmemberPhil Jeary21-Jun-04 0:06 
GeneralRe: Another (maybe simpeler?) approach - in VB.Net Pinmemberzjerry7-Oct-04 5:57 
GeneralRe: Thanks! PinmemberLantric21-Nov-04 2:58 
GeneralRe: Another (maybe simpeler?) approach - in VB.Net PinsussAnonymous7-Apr-05 23:12 
GeneralRe: Another (maybe simpeler?) approach - in VB.Net PinmemberFrank Esser25-Aug-05 10:26 
QuestionRe: Another (maybe simpeler?) approach - in VB.Net Pinmemberrugbygeek15-Feb-06 10:00 
AnswerRe: Another (maybe simpeler?) approach - in VB.Net PinmemberPolymorpher13-Jun-06 3:44 
GeneralRe: Another (maybe simpeler?) approach - in VB.Net PinmemberLokanatha Reddy16-Jan-07 19:56 
GeneralRe: Another (maybe simpeler?) approach - in VB.Net PinmemberPolymorpher13-Jun-06 3:41 
GeneralRe: Another (maybe simpeler?) approach - in VB.Net PinmemberLokanatha Reddy22-Jan-07 0:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    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 | Mobile
Web04 | 2.8.140821.2 | Last Updated 11 Mar 2002
Article Copyright 2002 by Torsten Mauz
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid