Hi
Ok my problem is to get the list of server names on a system ie the following code works jus fine for me:


Dim db As SQLDMO.Database
Dim osqldmo As SQLDMO.SQLServer
Dim sqName As String, i As Integer, ii As Integer, UserNames As String, servernameS As String, pwdS As String


Set osqldmo = New SQLDMO.SQLServer
servernameS = InputBox("Please enter the server name: ")
UserNames = InputBox("Please enter user name for server: ")
pwdS = InputBox("Please enter password: ")

osqldmo.Connect servernameS, UserNames, pwdS


For Each db In osqldmo.Databases
List1.AddItem db.Name
Next

osqldmo.DisConnect
Set osqldmo = Nothing


But if I want to display the list of servers available on that machine then how would I do that? Basically what I want to do is connect to an ODBC database but the problem is that it's not going to be the same ODBC database all the time and therefore I cant predict. Meaning that I must access all the ODBC dsn available on that machine and display this list to user so s/he may choose one.

Tank you all