#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2004
    Posts
    2
    Rep Power
    0

    filter by empty string


    Hi, i'm new to LDAP and i need to create a filter string to search for all attributes that do not have entry in them.
    What is the java syntax to do that?

    thanks
  2. #2
  3. Psycho Canadian
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Jan 2001
    Location
    Canada
    Posts
    4,846
    Rep Power
    635
    Why java? you don't use java syntax for it, you'd use a ldap filter to find it. The easiest way would be like this:
    (!(myattribute=*))
    To get more then one attribute you must add to it, you can do.
    (|(!(myattribute1=*))(!(myattribute2=*))(!(myattribute3=*)))

    Goto this thread and find RFC 2254 it explains how an ldap filter works.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2004
    Posts
    2
    Rep Power
    0
    Viper_SB, you are right i didn't mean java syntax, i meant ldap filter query.
    Thank you i'll try that.

IMN logo majestic logo threadwatch logo seochat tools logo