|
-
Oct 10th, 1999, 05:17 PM
#1
Thread Starter
Member
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
-
Oct 12th, 1999, 03:23 PM
#2
Thread Starter
Member
Hi all
Come on guys/ladies I cant believe this is really that much to ask!
Thanks in advance again
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|