Click here to Skip to main content
6,629,377 members and growing! (22,914 online)
Email Password   helpLost your password?
Languages » VBScript » General     Intermediate

List SQL Servers on a network

By Torsten Mauz

An activeX dll which lists any active SQL servers on your local network
VBScript, VB 6, Windows, Dev
Posted:10 Mar 2002
Views:92,718
Bookmarked:11 times
Unedited contribution
Announcements
Loading...
 
Search    
Advanced Search
Add to IE Search
printPrint   add Share
      Discuss Discuss   Broken Article?Report  
17 votes for this article.
Popularity: 3.38 Rating: 2.75 out of 5
5 votes, 35.7%
1
1 vote, 7.1%
2
1 vote, 7.1%
3
2 votes, 14.3%
4
5 votes, 35.7%
5

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 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 it's 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.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Torsten Mauz


Member

Occupation: Web Developer
Location: United Kingdom United Kingdom

Other popular VBScript articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 18 of 18 (Total in Forum: 18) (Refresh)FirstPrevNext
GeneralHow i can do it at c#? Pinmemberblud0ff5:04 18 Oct '05  
GeneralAnother (maybe simpeler?) approach PinmemberRogier Reedijk2:29 12 Mar '02  
GeneralRe: Another (maybe simpeler?) approach Pinmembermostevil3:12 21 May '02  
GeneralRe: Another (maybe simpeler?) approach PinmemberRogier Reedijk2:36 22 May '02  
GeneralRe: Another (maybe simpeler?) approach PinmemberPettys12:00 10 Jul '02  
GeneralRe: Another (maybe simpeler?) approach PinsussAnonymous22:46 27 May '03  
GeneralRe: Another (maybe simpeler?) approach PinmemberTorsten Mauz1:20 29 May '03  
GeneralRe: Another (maybe simpeler?) approach Pinmemberhaberdasher7:02 16 Jul '03  
GeneralRe: Another (maybe simpeler?) approach PinmemberPhil Jeary1:06 21 Jun '04  
GeneralRe: Another (maybe simpeler?) approach - in VB.Net Pinmemberzjerry6:57 7 Oct '04  
GeneralRe: Thanks! PinmemberLantric3:58 21 Nov '04  
GeneralRe: Another (maybe simpeler?) approach - in VB.Net PinsussAnonymous0:12 8 Apr '05  
GeneralRe: Another (maybe simpeler?) approach - in VB.Net PinmemberFrank Esser11:26 25 Aug '05  
QuestionRe: Another (maybe simpeler?) approach - in VB.Net Pinmemberrugbygeek11:00 15 Feb '06  
AnswerRe: Another (maybe simpeler?) approach - in VB.Net PinmemberPolymorpher4:44 13 Jun '06  
GeneralRe: Another (maybe simpeler?) approach - in VB.Net PinmemberLokanatha Reddy20:56 16 Jan '07  
GeneralRe: Another (maybe simpeler?) approach - in VB.Net PinmemberPolymorpher4:41 13 Jun '06  
GeneralRe: Another (maybe simpeler?) approach - in VB.Net PinmemberLokanatha Reddy1:53 22 Jan '07  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 10 Mar 2002
Editor:
Copyright 2002 by Torsten Mauz
Everything else Copyright © CodeProject, 1999-2009
Web17 | Advertise on the Code Project