How to handle a space in a LDAP string?

Discussion in 'Scripting' started by Migration Guy, Sep 22, 2006.

  1. I have this line that keeps getting an error because it has a space between
    West & Division. I can't rename West Division, so how do I work around it?


    Set objOU = GetObject ("LDAP://cn=Groups,ou=US,dc=West
    Division,dc=abc,dc=xyzco,dc=com")

    I have tried to add a " & that gives an error that it is expecting a )

    TIA
     
    Migration Guy, Sep 22, 2006
    #1
    1. Advertisements

  2. From: "Migration Guy" <>

    | I have this line that keeps getting an error because it has a space between
    | West & Division. I can't rename West Division, so how do I work around it?
    |
    | Set objOU = GetObject ("LDAP://cn=Groups,ou=US,dc=West
    | Division,dc=abc,dc=xyzco,dc=com")
    |
    | I have tried to add a " & that gives an error that it is expecting a )
    |
    | TIA

    Try; %20

    Example:
    LDAP://cn=Groups,ou=US,dc=West%20Division,dc=abc,dc=xyzco,dc=com
     
    David H. Lipman, Sep 22, 2006
    #2
    1. Advertisements

  3. I'm puzzled. I've never had problems binding to objects with spaces in the
    Distinguished Name. I have objects with a space in the common name. The
    ou=Domain Controllers OU has a space in the name. True, I've never had a
    domain component with a space, but I would not expect it to be a problem.
     
    Richard Mueller, Sep 22, 2006
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.