Click here to Skip to main content
Licence CPOL
First Posted 10 Mar 2002
Views 110,077
Downloads 3,795
Bookmarked 13 times

List SQL Servers on a Network

By | 10 Mar 2002 | Article
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)

About the Author

Torsten Mauz

Web Developer

United Kingdom United Kingdom

Member



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

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
QuestionHow i can do it at c#? Pinmemberblud0ff4:04 18 Oct '05  
GeneralAnother (maybe simpeler?) approach PinmemberRogier Reedijk1:29 12 Mar '02  
GeneralRe: Another (maybe simpeler?) approach Pinmembermostevil2:12 21 May '02  
GeneralRe: Another (maybe simpeler?) approach PinmemberRogier Reedijk1:36 22 May '02  
GeneralRe: Another (maybe simpeler?) approach PinmemberPettys11:00 10 Jul '02  
GeneralRe: Another (maybe simpeler?) approach PinsussAnonymous21:46 27 May '03  
GeneralRe: Another (maybe simpeler?) approach PinmemberTorsten Mauz0:20 29 May '03  
GeneralRe: Another (maybe simpeler?) approach Pinmemberhaberdasher6:02 16 Jul '03  
GeneralRe: Another (maybe simpeler?) approach PinmemberPhil Jeary0:06 21 Jun '04  
GeneralRe: Another (maybe simpeler?) approach - in VB.Net Pinmemberzjerry5:57 7 Oct '04  
GeneralRe: Thanks! PinmemberLantric2:58 21 Nov '04  
GeneralRe: Another (maybe simpeler?) approach - in VB.Net PinsussAnonymous23:12 7 Apr '05  
GeneralRe: Another (maybe simpeler?) approach - in VB.Net PinmemberFrank Esser10:26 25 Aug '05  
QuestionRe: Another (maybe simpeler?) approach - in VB.Net Pinmemberrugbygeek10:00 15 Feb '06  
AnswerRe: Another (maybe simpeler?) approach - in VB.Net PinmemberPolymorpher3:44 13 Jun '06  
GeneralRe: Another (maybe simpeler?) approach - in VB.Net PinmemberLokanatha Reddy19:56 16 Jan '07  
GeneralRe: Another (maybe simpeler?) approach - in VB.Net PinmemberPolymorpher3:41 13 Jun '06  
GeneralRe: Another (maybe simpeler?) approach - in VB.Net PinmemberLokanatha Reddy0:53 22 Jan '07  
Will it be work for Oracle, if I cange Driver details("DRIVER=SQL SERVER")?
I tried it, not working. I want get the list of oracle servers connected to my machine.
 
Loka
 

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.

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