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

List SQL Servers on a Network

By , 10 Mar 2002
 

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)

About the Author

Torsten Mauz
Web Developer
United Kingdom United Kingdom
Member
No Biography provided

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
Hint: For improved responsiveness ensure Javascript is enabled and choose 'Normal' from the Layout dropdown and hit 'Update'.
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
QuestionHow i can do it at c#?memberblud0ff18 Oct '05 - 4:04 
GeneralAnother (maybe simpeler?) approachmemberRogier Reedijk12 Mar '02 - 1:29 
GeneralRe: Another (maybe simpeler?) approachmembermostevil21 May '02 - 2:12 
GeneralRe: Another (maybe simpeler?) approachmemberRogier Reedijk22 May '02 - 1:36 
GeneralRe: Another (maybe simpeler?) approachmemberPettys10 Jul '02 - 11:00 
GeneralRe: Another (maybe simpeler?) approachsussAnonymous27 May '03 - 21:46 
GeneralRe: Another (maybe simpeler?) approachmemberTorsten Mauz29 May '03 - 0:20 
GeneralRe: Another (maybe simpeler?) approachmemberhaberdasher16 Jul '03 - 6:02 
GeneralRe: Another (maybe simpeler?) approachmemberPhil Jeary21 Jun '04 - 0:06 
GeneralRe: Another (maybe simpeler?) approach - in VB.Netmemberzjerry7 Oct '04 - 5:57 
GeneralRe: Thanks!memberLantric21 Nov '04 - 2:58 
GeneralRe: Another (maybe simpeler?) approach - in VB.NetsussAnonymous7 Apr '05 - 23:12 
GeneralRe: Another (maybe simpeler?) approach - in VB.NetmemberFrank Esser25 Aug '05 - 10:26 
QuestionRe: Another (maybe simpeler?) approach - in VB.Netmemberrugbygeek15 Feb '06 - 10:00 
AnswerRe: Another (maybe simpeler?) approach - in VB.NetmemberPolymorpher13 Jun '06 - 3:44 
GeneralRe: Another (maybe simpeler?) approach - in VB.NetmemberLokanatha Reddy16 Jan '07 - 19:56 
GeneralRe: Another (maybe simpeler?) approach - in VB.NetmemberPolymorpher13 Jun '06 - 3:41 
GeneralRe: Another (maybe simpeler?) approach - in VB.NetmemberLokanatha Reddy22 Jan '07 - 0:53 

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

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