Ldap search query with parameters
Posted
by djerry
on Stack Overflow
See other posts from Stack Overflow
or by djerry
Published on 2010-05-03T09:04:44Z
Indexed on
2010/05/03
9:08 UTC
Read the original article
Hit count: 284
Hey guys,
I'm using a ldap server to store phonerecords. I want to select a record with a specific telnumber. So this is what I'm doing:
LdapSearchResults lsc = _conn.Search(dnForPhonebook, 1, "(&(objectClass=*)(uid=" + id + "))", null, false);
I'm using novell library for ldap commands. The options i need to give in for the Search command are the dn to the node "phonebook" (string), scope (int), filter (string), attrrs (string[]) and typesOnly (bool). As you can see, for the filter, i'm pasting the parameter as string in de stringfilter.
I was wondering, does ldap have the same way of work as mysql or sql server, which can work with paramaters?
Thanks in advance.
© Stack Overflow or respective owner