Martin Reid
mwp.reid at qub.ac.uk
Fri May 5 14:47:37 CDT 2006
Thanks James.
Just did something similar for the actual database names which is step 2. Idea is combo 1 lists the servers, then combo 2 lists the databases on each server.
Best Wishes
Martin
Martin WP Reid
Training and Assessment Unit
Riddle Hall
Belfast
tel: 02890 974477
________________________________
From: accessd-bounces at databaseadvisors.com on behalf of James Barash
Sent: Fri 05/05/2006 20:36
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Enumerate SQL Servers
Martin:
Here is a example which should work in Access. You will need to reference
the SQLDMO library to make it work.
Dim oApp As SQLDMO.Application
Dim oNames As SQLDMO.NameList
Dim oName As Variant
Set oApp = New SQLDMO.Application
Set oNames = oApp.ListAvailableSQLServers()
For Each oName In oNames
cboServers.AddItem oName
Next
Hope it helps.
James Barash
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Martin Reid
Sent: Friday, May 05, 2006 3:05 PM
To: Access Developers discussion and problem solving
Subject: [AccessD] Enumerate SQL Servers
Anyone got an example of populating a drop down list in Access with all
available SQL Servers?
I am building a new login procedure.
Martin
Martin WP Reid
Training and Assessment Unit
Riddle Hall
Belfast
tel: 02890 974477
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com <http://www.databaseadvisors.com/>