Ponthecomputer
asked on
Using a variable in a SELECT statement when querying LDAP - VBScript
I need to query LDAP using a variable as part of the select statement. This syntax won't work. Is is possible to do this and if so, how can I correct this so that it will work? Thanks!
dim samvariable
samvariable = johnD
"SELECT mail FROM 'LDAP://dc=fabrikam,dc=com ' WHERE objectCategory='user' " & _
"AND sAMAccountName=" & samvariable
dim samvariable
samvariable = johnD
"SELECT mail FROM 'LDAP://dc=fabrikam,dc=com
"AND sAMAccountName=" & samvariable
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER