[Logo] LDAPSoft LDAP And Active Directory Tools Community Forums
  [Search] Search   [Register] Register /  [Login] Login 
 
Ldap search with parentheses in the search input  XML
Forum Index » General Discussion
Author Message
james



Joined: 06/08/2008 08:12:12
Messages: 5
Offline

What we encountered today involves the usage of open / close parentheses which are wrapped around the area code.

The error received is ---
Filter Error
LDAPLocalException: The invalid character "(" needs to be escaped as "\28" (87) Filter Error

What is the correct way to format a text search for a phone number that begins (794)?

Thank you in advance for your time and assistance
support



Joined: 27/06/2008 19:01:18
Messages: 123
Offline

Open and close parentheses needed to be escaped with \28 and \29, respectively. To query homePhone (771) 877-1910 please format the query such as:

(homePhone=\28771\29877-1910)

and with SQL:

select * from ou=People,dc=test,dc=com where homePhone= '\28771\29877-1910'

Thanks
LDAPSoft Support
james



Joined: 06/08/2008 08:12:12
Messages: 5
Offline

One other question of a related manner. Do you have a listing/link of the escape codes and the values they represent that you would send us?

Thank you.
support



Joined: 27/06/2008 19:01:18
Messages: 123
Offline

You may have to look a the LDAP specifications to find out the escape code.

Here is the link to the specification, search for parenthesis and look at the example for equivalent codes for start and end parenthesis.

(o=Parens R Us \28for all your parenthetical needs\29)

http://tools.ietf.org/html/rfc4515

Thanks
Support
 
Forum Index » General Discussion
Go to:   
[Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing  
Powered by JForum 2.1.9 © JForum Team