by Vlad Vissoultchev (13 Submissions)
Category: Databases/Data Access/DAO/ADO
Compatability: Visual Basic 5.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating:
(5 Votes)

This sample project enumerate all active SQL servers in LAN using ODBC function SQLBrowseConnect. This method is working both for NT and 9x based OSes. The behaviour of this ODBC function is changed in MDAC 2.6 to include all SQL Server instances found on each machine. In MDAC prios 2.6 it's enumerating servers listening on named pipes while after this release its using NetBIOS broadcasts over TCP/IP to receive response from the active servers. The code is compactly written in decoupled module and a form. The module is easy to be recycled in projects of yours and the form can be studied as a sample GUI to it. Enjoy!
Download Enumerate SQL Servers & DBs (working on Win 9x) (6 KB)