Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Enumerating SQL Servers in VFP
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
01384624
Message ID:
01384661
Views:
90
Menachem,

You can try running the appropriate LDAP query on your ActiveDirectory network. For example
loLDAP = getobject( "LDAP://OU=SQL Servers,OU=Dev Servers,OU=Servers,DC=austx,DC=ad,DC=xyz,DC=com" )
for each loObject in loLDAP
   debugout loObject.Name
endfor
You can also use other queries to get all the right OUs and DCs to put in the query or sweet talk the AD admin to giving you the appropriate structure they have mapped onto the network.

>I need a means to enumerate and list all the SQL Server accessible to a machine. The solution I saw uses NetServerEnum() which I guess worked fine for SQL Server 2000 but it doesn't properly return names of servers + instances as used by SQL Server 2005.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform