I'm having real difficult getting a piece of code in VBScript to work properly in Lotus Notes via Lotus Script. When I do the debug, all is fine until a line which uses GetObject, after which it gives a type mismatch error. I've since found out that two parameters are required for GetObject in Lotus Script GetObject(Path, Class) whereas the script works perfectly well in VB Script.
Please can somebody let me know which modifications I need to make to get this code working in Lotus Notes
Set ADOConn = CreateObject("ADODB.Connection")
ADOConn.Provider = "ADsDSOObject"
ADOConn.Open "ADs Provider"
Set ADOCommand = CreateObject("ADODB.Command")
Set ADOCommand.ActiveConnection = ADOConn
ADOCommand.CommandText = "<LDAP://uk-bre-cts-vsed-read1.acme.com/dc=acme,dc=com>;(&(objectclass=acmeperson)(uid=bloggs01));adspath;Subtree"
Set RS = ADOCommand.Execute
If Not rs.eof Then
While Not RS.EOF
Set objUser = GetObject("", RS.Fields("adspath"))
wscript.echo "BU_Cat,"& objuser.get("businesscategory")
wscript.echo "Country short,"& objuser.get("c")
wscript.echo "Surname, Forename,"& objuser.get("cn")
wscript.echo "Country full,"& objuser.get("co")
Set ADOConn = Nothing
Set ADOCommand = Nothing
Set RS = Nothing