">" in a asp classic vbscript string blanks the entire string

I'm modifying an old piece of code I don't want to upgrade ( no time), but it uses classic ASP.

I'm trying to add an LDAP query, but when I do this:

sBase = "<LDAP://" & "sDNSDomain" & " >"

I end up with a blank string.  If I remove the ">" then it's fine.  I've been unable to find out how to escape it.... and the LDAP query won't work without it.

What am I missing here?  The LDAP query examples I run across all give this format for building a query, but it simply won't work for me.
scmaceAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rikin ShahMicrosoft Dynamics CRM ConsultantCommented:
Hi,

You can remove both brackets... and try again.
0
sybeCommented:
Of course it is no blank string. In an HTML document, your browser will not show anything between <.... and ...>, because it supposes it is some kind of html-element.

Escape them with the Server.HTMLEncode() function, or simply:

> = &gt;
< = &lt;
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
scmaceAuthor Commented:
I spent so much time chasing what I thought was a badly formed query, this enabled me to find the SECURITY issue that was preventing successful execution.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.