Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting Script to VFP
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Converting Script to VFP
Miscellaneous
Thread ID:
01243994
Message ID:
01243994
Views:
68
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,
Next
Reply
Map
View

Click here to load this message in the networking platform