Subject | Re: [Firebird-Java] How to mask ' ? |
---|---|
Author | Carsten Schäfer |
Post date | 2006-03-20T09:56:18Z |
This is the PreparedStatement:
SELECT t_apos.ID_APOS,
t_apos.f_liefer_nr,t_apos.f_status,t_apos.f_id_auftrag,t_auftrag.f_id_kunde
FROM t_apos JOIN t_auftrag ON f_id_auftrag = id_auftrag WHERE
(t_apos.f_anr_kunde LIKE ? ESCAPE '\') AND t_apos.f_id_auftrag + 0 != 0
And this is the Code:
System.err.println("STR:"+StringTools.erzeugeSQLString(s,
StandardProperties_Lokal.getSUCHE_MASKIERER()));
ps.setString(j, StringTools.erzeugeSQLString(s,
StandardProperties_Lokal.getSUCHE_MASKIERER()));
with this output:
STR:111111''2222
(When i use the same select in IBExpert a result is found!)
Carsten
Roman Rokytskyy schrieb:
SELECT t_apos.ID_APOS,
t_apos.f_liefer_nr,t_apos.f_status,t_apos.f_id_auftrag,t_auftrag.f_id_kunde
FROM t_apos JOIN t_auftrag ON f_id_auftrag = id_auftrag WHERE
(t_apos.f_anr_kunde LIKE ? ESCAPE '\') AND t_apos.f_id_auftrag + 0 != 0
And this is the Code:
System.err.println("STR:"+StringTools.erzeugeSQLString(s,
StandardProperties_Lokal.getSUCHE_MASKIERER()));
ps.setString(j, StringTools.erzeugeSQLString(s,
StandardProperties_Lokal.getSUCHE_MASKIERER()));
with this output:
STR:111111''2222
(When i use the same select in IBExpert a result is found!)
Carsten
Roman Rokytskyy schrieb:
>> I do use parameters and PreparedStatements !
>>
>
> Ups! Sorry, I missed that.
>
>
>> And i mask ' with '' !
>> My problem is that with Jaybird nothing is found !
>>
>
> What is the valus of your parameter?
>
> Roman
>
>
>
>