Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Binding to DL

Reply
 
Old 03-16-2009   #1 (permalink)
Bart Perrier


 
 

Binding to DL

I am binding to a Universal DL that is preceeded by a slash ("/") and
receiving the error: -2147463168.

If I change the group to a group without a slash, I can bind without error.

Here is a copy of my bind statement.

DIST_GROUP = "CN=/RE RAG Group
Name,OU=My-OU,DC=My-Domain,DC=OurForest,DC=net"

Set objGroup = GetObject _
("LDAP://" & DIST_GROUP)

Is anyone familiar with a dislike on the part of vbScript with the slash we
preceed certain DLs using?

Thanks.

Bart


My System SpecsSystem Spec
Old 03-16-2009   #2 (permalink)
Richard Mueller [MVP]


 
 

Re: Binding to DL

Bart wrote:

=>I am binding to a Universal DL that is preceeded by a slash ("/") and
Quote:

> receiving the error: -2147463168.
>
> If I change the group to a group without a slash, I can bind without
> error.
>
> Here is a copy of my bind statement.
>
> DIST_GROUP = "CN=/RE RAG Group
> Name,OU=My-OU,DC=My-Domain,DC=OurForest,DC=net"
>
> Set objGroup = GetObject _
> ("LDAP://" & DIST_GROUP)
>
> Is anyone familiar with a dislike on the part of vbScript with the slash
> we preceed certain DLs using?
>
> Thanks.
If you use ADSI (which VBScript does), the slash character must be escaped
with the backslash escape character. For example:

DIST_GROUP = "CN=\/RE RAG Group
Name,OU=My-OU,DC=My-Domain,DC=OurForest,DC=net"

See this link for details:

http://www.rlmueller.net/CharactersEscaped.htm

Depending on your code, you may need to use the Replace function. For
example:

DIST_GROUP = Replace(DIST_GROUP, "/", "\/")

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--


My System SpecsSystem Spec
Old 03-17-2009   #3 (permalink)
Bart Perrier


 
 

Re: Binding to DL


"Richard Mueller [MVP]" <rlmueller-nospam@xxxxxx> wrote in
message news:OHmcGfppJHA.3896@xxxxxx
Quote:

> Bart wrote:
>
> =>I am binding to a Universal DL that is preceeded by a slash ("/") and
Quote:

>> receiving the error: -2147463168.
>>
>> If I change the group to a group without a slash, I can bind without
>> error.
>>
>> Here is a copy of my bind statement.
>>
>> DIST_GROUP = "CN=/RE RAG Group
>> Name,OU=My-OU,DC=My-Domain,DC=OurForest,DC=net"
>>
>> Set objGroup = GetObject _
>> ("LDAP://" & DIST_GROUP)
>>
>> Is anyone familiar with a dislike on the part of vbScript with the slash
>> we preceed certain DLs using?
>>
>> Thanks.
>
> If you use ADSI (which VBScript does), the slash character must be escaped
> with the backslash escape character. For example:
>
> DIST_GROUP = "CN=\/RE RAG Group
> Name,OU=My-OU,DC=My-Domain,DC=OurForest,DC=net"
>
> See this link for details:
>
> http://www.rlmueller.net/CharactersEscaped.htm
>
> Depending on your code, you may need to use the Replace function. For
> example:
>
> DIST_GROUP = Replace(DIST_GROUP, "/", "\/")
>
> --
> Richard Mueller
> MVP Directory Services
> Hilltop Lab - http://www.rlmueller.net
> --
>
>
The backslash works perfectly. This is a huge help, Richard. Thank you.

Bart Perrier


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
VPN and binding order. Vista networking & sharing


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46