Hi Larry,
 
That escape trick is probably enough for you (using perhaps the VBS Replace function, if your DNs are in variables), but depending on what you are doing, you have also other options to get access to the objects with slash characters in the RDN:
 
- Use ADO over ADSI (of course, this is read only)
 
- First bind to the parent container and then enumerate with For Each objChild...
 
- First bind to the parent container and then bind to the child with an RDN instead of a DN, that is "Set objChild = objContainer.GetObject("group", "CN=some/group")
 
Yours, Sakari
 
 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Passo, Larry
Sent: Thursday, February 17, 2005 12:08 AM
To: [email protected]
Subject: RE: [ActiveDir] LDAP query question

Thanks to all, changing �/� to �\/� in the dn did the trick.

 

 

Unfortunately, I can�t get the groups renamed. Luckily, none of my users have created the groups using commas in their names. We do have numerous groups with embedded spaces and those haven�t caused any of my apps to fail.

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of joe
Sent: Wednesday, February 16, 2005 12:44 PM
To: [email protected]
Subject: RE: [ActiveDir] LDAP query question

 

Yep.

 

But I would truly recommend renaming the objects. I would also kill any names with spaces in them and commas in them, those are also a pain to deal with.

 

  joe

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dean Wells
Sent: Wednesday, February 16, 2005 3:03 PM
To: Send - AD mailing list
Subject: RE: [ActiveDir] LDAP query question

Initial thought - string substitution, escape it with (ironically) a backslash "\" ??

--
Dean Wells
MSEtechnology
* Email: [EMAIL PROTECTED]
http://msetechnology.com

 

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Passo, Larry
Sent: Wednesday, February 16, 2005 2:05 PM
To: [email protected]
Subject: [ActiveDir] LDAP query question

I have developed a number of applications that do various queries on AD. However, I have run into a problem with doing an LDAP query in groups that have been named with the �/� character in their name. Since the group was named with a �/�, the distinguished name for the object also has the �/� character. When my app tries to connect to the object using the following, an error results:

 

Create Object("LDAP://" & distinguishedname)

 

The LDAP query is assuming that I�m trying to do a query of the form LDAP://server/distinguishedname. The WINNT provider has the same issue.

 

Any suggestions? (Besides renaming the groups?)

Reply via email to