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

JDBC-LDAP bridge Like with PreparedStatement



Hi All,
 
I am using the latest version of the JDBC-LDAP bridge and I was wondering if it is possible to use a PreparedStatment (i.e. with ? place holders) using the ´like´ keyword ?
 
Example:
 
"select  mail  from subTreeScope;ou=UsuariosInt,ou=Entidades,o=amena.es where sn like ?"
 
If I use the SQL LDAP browser and give a sn a value like 'pro%' it returns the expected results, but if I exexute it via java code it fails:
 
PreparedStatement stm = conn.prepareStatement(
"select  mail  from subTreeScope;ou=UsuariosInt,ou=Entidades,o=amena.es where sn like ?"
);
 
stm.setString(1,"pro%");
ResultSet res = stm.executeQuery();
 
A call to res.hasNext() returns false.

 
Any help would be appreciated.
 
Gerardo Macari
 
 
 
-------------------------------------------------------------------------------------------------------------------
Este correo electrónico y, en su caso, cualquier fichero anexo al mismo, contiene información de carácter confidencial exclusivamente dirigida a su destinatario o destinatarios. Queda prohibida su divulgación, copia o distribución a terceros sin la previa autorización escrita de Indra. En el caso de haber recibido este correo electrónico por error, se ruega notificar inmediatamente esta circunstancia mediante reenvío a la dirección electrónica del remitente. POR FAVOR, ANTES DE IMPRIMIR ESTE CORREO ELECTRÓNICO CONSIDERE SU APORTACIÓN A LA CONSERVACIÓN DEL MEDIO AMBIENTE POR LA REDUCCIÓN DE CONSUMO DE PAPEL.

The information in this e-mail and in any attachments is confidential and solely for the attention and use of the named addressee(s). You are hereby notified that any dissemination, distribution or copy of this communication is prohibited without the prior written consent of Indra. If you have received this communication in error, please, notify the sender by reply e-mail. PLEASE CONSIDER YOUR ENVIRONMENTAL RESPONSIBILITY BEFORE PRINTING THIS E-MAIL.