Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Converting Script to VFP
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Converting Script to VFP
Divers
Thread ID:
01243994
Message ID:
01243994
Vues:
69
Hi Gang,

I've finally got my scripts working the way I want them to, but now I need to get all the code over into VFP (instead of script) so I can handle some additional processes, etc.

The code I am using in script (which works properly and does exactly what I want it to do is:
Const ADS_SCOPE_SUBTREE = 2
Set objConnection = CreateObject("ADODB.Connection")
Set objCommand =   CreateObject("ADODB.Command")
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"
Set objCommand.ActiveConnection = objConnection
objCommand.Properties("Page Size") = 1000
objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE 
objCommand.CommandText = _
    "SELECT distinguishedName,Name,displayname FROM 'LDAP://dc=bogus,dc=local' WHERE objectCategory='user' " & _
Set objRecordSet = objCommand.Execute
objRecordSet.MoveFirst
Do Until objRecordSet.EOF
    Wscript.Echo objRecordSet.Fields("distinguishedName").Value
    Wscript.Echo objRecordSet.Fields("Name").Value
    Wscript.Echo objRecordSet.Fields("displayName").Value
    objRecordSet.MoveNext
Loop
Does anyone have enough familiarity with script and VFP to tell me what syntax changes have to be made to work in VFP? Obviously I'll drop the "Set" command, etc. Other than that, I'm having a tough time. :-)

Thanks,
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform