Alex,
This works on my PC.
CLEAR
oSQLApp = CreateObject('SQLDMO.Application')
oServers = oSQLApp.ListAvailableSQLServers()
FOR EACH lcServer IN oServers
? lcServer
ENDFOR
>>Hi Alex,
>>
>>Try
CLEAR
>>oSQLApp = CreateObject('SQLDMO.Application')
>>oServers = oSQLApp.ListAvailableSQLServers()
>>For i = 1 TO oServers.Count
>> ? i, oServers.Item(i)
>>EndFor
Does it work?
>
>Yes it did. Now I'll have to see why the other one didn't: Doing a trace and guessing at the way to access collection items returned by ListAvailableServers (it is via Item[x]) I see that item[1] is indeed "(local)". An error 1429 (ole error) ocurrs in the next line of code which contains the command:
>FOR EACH lcServer in loServer && (loServer is the equivalent of your oServers object.
>
>Any suggestions?
>
>Thanks for the help.
>
>Alex
--sb--