473,399 Members | 2,159 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Getting list of database servers into combo box

Anyone know how I can pull in a list of available database servers on my
computer (which I will then use to populate a combo box)?

Even just the namespace to use would be a start, though more info than
that would be a lot more helpful.

Filling the combo box is something I think I can figure out. Just need
to know how to search for the servers.

The better option is how I could access these common forms used to
connect to databases, where all the layers are asked for in the form,
and at the end you hit a "Test Connection" button. Are those available
via code?
Feb 28 '08 #1
6 2625
One (crappy) way is to poll this registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\ Client\ConnectTo

sqldmo is a key phrase

http://www.google.com/search?hl=en&q...+of+servers%22

"doofy" <no**@notme.comwrote in message
news:47***********************@news.sonic.net...
Anyone know how I can pull in a list of available database servers on my
computer (which I will then use to populate a combo box)?

Even just the namespace to use would be a start, though more info than
that would be a lot more helpful.

Filling the combo box is something I think I can figure out. Just need to
know how to search for the servers.

The better option is how I could access these common forms used to connect
to databases, where all the layers are asked for in the form, and at the
end you hit a "Test Connection" button. Are those available via code?

Feb 28 '08 #2
One more:
http://www.thescripts.com/forum/thread269246.html
"doofy" <no**@notme.comwrote in message
news:47***********************@news.sonic.net...
Anyone know how I can pull in a list of available database servers on my
computer (which I will then use to populate a combo box)?

Even just the namespace to use would be a start, though more info than
that would be a lot more helpful.

Filling the combo box is something I think I can figure out. Just need to
know how to search for the servers.

The better option is how I could access these common forms used to connect
to databases, where all the layers are asked for in the form, and at the
end you hit a "Test Connection" button. Are those available via code?

Feb 28 '08 #3
doofy wrote:
Anyone know how I can pull in a list of available database servers on my
computer (which I will then use to populate a combo box)?

Even just the namespace to use would be a start, though more info than
that would be a lot more helpful.

Filling the combo box is something I think I can figure out. Just need
to know how to search for the servers.

The better option is how I could access these common forms used to
connect to databases, where all the layers are asked for in the form,
and at the end you hit a "Test Connection" button. Are those available
via code?
Thanks for those links. At least now I have an acronym to work with,
and some code.
Feb 28 '08 #4
doofy wrote:
Anyone know how I can pull in a list of available database servers on my
computer (which I will then use to populate a combo box)?

Even just the namespace to use would be a start, though more info than
that would be a lot more helpful.

Filling the combo box is something I think I can figure out. Just need
to know how to search for the servers.

The better option is how I could access these common forms used to
connect to databases, where all the layers are asked for in the form,
and at the end you hit a "Test Connection" button. Are those available
via code?
By the way, that was sincere thanks. I was thinking that "at least now
I have an acronym to work with" sounded sarcastic.
Feb 28 '08 #5
I hear ya dude.

"Tone" is not relayed in emails very well.

It why its a terrible tool for things like conflict resolution or anything
outside of just presenting factual information.

...

But I appreciate the clarification.


"doofy" <no**@notme.comwrote in message
news:47***********************@news.sonic.net...
doofy wrote:
>Anyone know how I can pull in a list of available database servers on my
computer (which I will then use to populate a combo box)?

Even just the namespace to use would be a start, though more info than
that would be a lot more helpful.

Filling the combo box is something I think I can figure out. Just need
to know how to search for the servers.

The better option is how I could access these common forms used to
connect to databases, where all the layers are asked for in the form, and
at the end you hit a "Test Connection" button. Are those available via
code?

By the way, that was sincere thanks. I was thinking that "at least now I
have an acronym to work with" sounded sarcastic.

Feb 28 '08 #6
If you don't have access to the SQL DMO objects (or the SQL Management
objects which come with newer versions of SQL server), then you can call the
NetServerEnum API through the P/Invoke layer, looking for the
SV_TYPE_SQLSERVER type.


--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"doofy" <no**@notme.comwrote in message
news:47***********************@news.sonic.net...
Anyone know how I can pull in a list of available database servers on my
computer (which I will then use to populate a combo box)?

Even just the namespace to use would be a start, though more info than
that would be a lot more helpful.

Filling the combo box is something I think I can figure out. Just need to
know how to search for the servers.

The better option is how I could access these common forms used to connect
to databases, where all the layers are asked for in the form, and at the
end you hit a "Test Connection" button. Are those available via code?

Feb 28 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Kin®sole | last post by:
Hi I'm very new to VB (using VB6) I have two lists one blank and one containing names in the format of surname and then forename.I also have a combo box containing forenames.When I select a...
15
by: sara | last post by:
Hi I'm pretty new to Access here (using Access 2000), and appreciate the help and instruction. I gave myself 2.5 hours to research online and help and try to get this one, and I am not getting...
2
by: kmnotes04 | last post by:
Is it possible to link one drop-down box to another? For example, if a name is chosen from a drop-down list, can another drop-down list then automatically display the person's office as a result of...
7
by: EvanK | last post by:
Is there a way to access a list of available sql servers in vb and make a dropdown list?
6
by: AA Arens | last post by:
Hi, I have a database with 2 main forms. Contacts and companies. I share the base with two others via LAN. On the companies form I have buttons to navigate throught the records (>400). We are...
2
by: querry | last post by:
Hi all, I am trying to get a list of all the available sql servers and then populate them in a combo box. I do this with the following code taken from...
2
by: Lysander | last post by:
I have not seen this feature documented before, so I thought I would share it with you, as I will be using it in a later article. For a combo or list box, the source data is normally a...
0
by: TG | last post by:
Hi! Once again I have hit a brick wall here. I have a combobox in which the user types the server name and then clicks on button 'CONNECT' to populate the next combobox which contains all the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.