Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't connect to servers with SQLSMO
Message
 
 
À
02/12/2002 00:07:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00728512
Message ID:
00728564
Vues:
25
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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform