Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to find dns available to use

Status
Not open for further replies.

ghobbes98

Programmer
Feb 7, 2002
62
0
0
IE
I was wondering how to query the system to return a list of the dns available at run time.
I want to simply then list the ones available to the user so they can pick which ever one they want to use
Any ideas
Thanks
G
 
Those values are stored in the registry in the following key

HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers

Now, if you open Project->References and check the checkbox next to Registration Manipulation Classes you'll be able to use the following objects:

'Put this code in the right place and it should do exactly what you need.

Dim key As RegKey
Dim val As RegValue

Set key = RegKeyFromString("\HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers")
For Each val In key.Values
Combo1.AddItem val.Name
Next


Hope this helps!
Josh
 
Hi MrEGuest,

I could not locate the ref. to Registration Manipulation Classes in my project. Can you give the name of the dll.

Thanks
Murali Bala
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top