WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

ADSI
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

LDAP Path with Comma


Question:

Small issue with a couple Ds functions. Maybe it's an AD thing, can't say...

I'm a little behind in updates and I'm running Winbatch 2003J. The issue is in paths that are returned with DsFindPath. If the CN has a comma in it, the path is returned with a \,.

For instance a search for "(CN=User, WB)" Returns a path of LDAP://DOMAIN/CN=User\, WB,OU=Blah...)

I realize why this is happening is fairly obvious as a comma is used in the CN and also the delimiter for the LDAP path, however the path returned is not useable or valid. I have to do a strreplace to clean up the "\," to revert the path to a valid one for manipulating the object.

Ex:
path=DsFindPath("LDAP://Domain", "CN=User, Wb")
path=StrReplace(path,"\,",",")
Message("Fixed Path",path)
It may be working as it's "supposed to" but that doesn't make it any less of an annoyance. I'd qualify it as a bug because I'm asking for paths and am not getting real paths. My question is .... is this something you can / will fix? (or has it been in newer versions?)

Answer:

The returned path is entirely generated by the underlying OS service. It is a valid LDAP path and is the "real" path. In fact, if you try to access the object using the path without the back slash, you will get the error " The distinguished name has an invalid syntax."

So it would be a bug, if dsFindPath did not include the back slash when the distinguished name contains a comma.


Article ID:   W16315
File Created: 2005:02:18:12:19:46
Last Updated: 2005:02:18:12:19:46