You can't reference it that way.. you'll probably need to use the EXECUTE statement, which sometimes required a bit of VooDoo to work just right. ;\) I usually make a call using fnLDAPQuery, which allows you to pass your variable to the query string. That function requires a bit of effort to extract your data, but it's still easier than most other methods.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D