[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Back-SQL / Oracle problem - Bind variables?
Hi,
thanks for the hint. I tried that in several variations (the oracle
syntax ist cast with the brakets):
1) "UPPER(ldap_entries.dn) LIKE CONCAT('%',UPPER(cast('?' as varchar2(255))))
This leads to an error message:
Message: [unixODBC][Easysoft][Oracle]ORA-12704: character set mismatch at offset 240
2) A "'" around the "?" is successful, but returns no data like the original
statement - But I guess anyway, that it will not be treated as a bind
variable then?
3) "UPPER(ldap_entries.dn) LIKE CONCAT('%',cast(UPPER(?) as varchar2(255)))"
This should be equivalent (?) to (1) but just behaves like the original
statement and does not return any data.
I used varchar2(255) because its the datatype of the ldap_entries.dn
column. I also tried varchar and (256) to be sure... same behaviour.
So it seems to me, that the cast is not the solution or I am too confused :-)
Regards,
Daniel
On Tue, May 20, 2003 at 11:39:50AM +0200, Pierangelo Masarati wrote:
>
> > Hi,
> >
> > I could not find anything about this...
> >
> > I am trying to install a OpenLDAP 2.0.27 on a Red Hat 7.2 as a frontend
> > to a Oracle 8.1.7 using unixODBC and the proprietary Easysoft driver.
> >
> > Now there seems to be a problem with the bind variables used in the
> > subtree select.
> >
> > When I set the configruation to
> >
> > subtree_cond "UPPER(ldap_entries.dn) LIKE
> > CONCAT('%',UPPER('ou=applvl,dc=domain'))"
> >
> > I get the entries, while with the correct
> >
> > subtree_cond "UPPER(ldap_entries.dn) LIKE CONCAT('%',UPPER(?))"
>
> Never tried with oracle; however, I suspect a cast problem.
> Depending on the cast syntax in Oracle, I'd try something
> like
>
> "UPPER(ldap_entries.dn) LIKE CONCAT('%',UPPER(cast ? as varchar(256)))"
>
> p.
>
> --
> Pierangelo Masarati
> mailto:pierangelo.masarati@sys-net.it
>
>
>
--
Daniel Riek <riek@de.alcove.com> - http://www.alcove.com/de/
* Technical Manager - Tel.: +49 (0)2 28 / 9 08 69 85
* ALCOVE Deutschland GmbH - Fax: +49 (0)2 28 / 9 08 69 84
* Liberating Software - Mobil: +49 (0)1 71 / 2 80 08 79