Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't connect to servers with SQLSMO
Message
 
 
À
02/12/2002 13:33:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00728512
Message ID:
00728706
Vues:
23
Both of them work for me and I'm using VFP7SP1. oServers is collection so I don't know why FOR EACH gives an error. What's the value of oServers.Count on your PC?

>It works in your machine? Interesting. In mine, FOR EACH fails, but if I replace it with FOR i=1 TO oServers.Count it works. From that it would seem that oServers is not a collection, which is needed for the FOR EACH, no?
>
>For the moment I am off the hook, but am curious why it worked in your machine.
>
>Thanks.
>
>Alex
>
>>Alex,
>>
>>This works on my PC.
>
CLEAR
>>oSQLApp = CreateObject('SQLDMO.Application')
>>oServers = oSQLApp.ListAvailableSQLServers()
>>FOR EACH lcServer IN oServers
>>	? lcServer
>>ENDFOR
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform