[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Fwd: Filter problem



This query:

SELECT * FROM ou=ugs WHERE dni= 44615492 and niu=24407

doesn't return nothing and this other:

String SQL1 =    "SELECT * FROM ou=ugs WHERE dni= 44615492 AND niu=24407";
PreparedStatement stmt = con.prepareStatement(SQL1);
rs = stmt.executeQuery();
(...)

returns the searched data correctly. The only word that changes is the "and", doing it uppercase.

This happens in the Octectstring's jdbc-ldap bridge, working against an iPlanet Directory, althought I dont know if this is important.

And the RFC 2254 filters return always the last condition.

WHERE (&(cn=John)(sn=Goodman)) --> returns like searching WHERE sn=Goodman


Thanks for your help.


Marc Boorshtein wrote:

Daniel,

The drivers aren't supposed to be case sensitive, does an error occurr
when this happens?  LDAP filters won't cause errors because they are
trated as one block by the code.  I'm shocked that they returned
anything.

Marc Boorshtein
On Thu, 2003-08-28 at 01:51, Daniel Merino wrote:


Thank you very much. I had tried this, but my problem was that I typed "and" instead of "AND" and the driver is case sensitive, so I tried the RFC 2254 filters. And that filters dont work well but dont give any error.

I will write to the list you told me, when I have more problems.
Thanks.

Marc Boorshtein wrote:



Daniel,

I am not sure what you mean by using "filters" the JDBC LDAP driver
doean't use ldap style filters, it instead uses SQL style "where"
conditions.  For instance:

(&(cn=John)(sn=Goodman)) --> cn=John AND sn=Goodman
(&(sn=Goodman)(cn=John)) --> sn=Goodman AND cn=John
(|(sn=Goodman)(cn=John)(niu=2253)) --> sn=Goodman OR cn=John OR niu-2253

I hope this helps.  In the futere please direct all requests to
openldap-software@OpenLDAP.org .

Marc Boorshtein






-- Daniel Merino daniel.merino@unavarra.es Departamento de Gestión - Servicio Informático Universidad Pública de Navarra.