escape character

Hi,

If is set escape to \ in oracle sqlplus ( set escape )

i can execute thet following query which finds results :

select VERKORDERKAARTEN882.VERKOK_ID
from VERKORDERKAARTEN VERKORDERKAARTEN882
inner join VERKORDERKAARTEN VERKORDERKAARTEN2841 on VERKORDERKAARTEN882.VERKOK_ID=VERKORDERKAAR
where upper(VERKORDERKAARTEN2841.VERKOK_VERSIE_MOTIVATIE) like upper(‘%%%’)
order by VERKORDERKAARTEN882.VERKOK_NR asc

VERKOK_ID

21174
21173
21200
21942

if i enter the serachstring %%% in the same column in a servoy find/search session the same sql is created :

select VERKORDERKAARTEN882.VERKOK_ID
from VERKORDERKAARTEN VERKORDERKAARTEN882
inner join VERKORDERKAARTEN VERKORDERKAARTEN2841 on VERKORDERKAARTEN882.VERKOK_ID=VERKORDERKAAR
where upper(VERKORDERKAARTEN2841.VERKOK_VERSIE_MOTIVATIE) like upper(?)
order by VERKORDERKAARTEN882.VERKOK_NR asc
and the params are : [%%%]

but no results are found

it seems that Servoy is not using \ as the escape character

???

Regards,

Hi Hans,

What if you escape the escape code ? Thus \.
Also what query do you see in the Database Performance page in the Servoy-admin pages?

Hope this helps.

Thanks Robert,

\ does not help.

The query i mentioned in my original post was retreived from Servoy using :

databaseManager.getSQL(forms[_form].foundset)
databaseManager.getSQLParameters(forms[_form].foundset)

Regards,

Hans,

Sounds like either the Oracle sessions Servoy is using do not use the \ as an escape character or Oracle/the JDBC driver parses the parameter input incorrectly.

I think the first is more likely, because when you do it manually, you also execute "set escape " first.

So, a couple of options:
1: try to set the escape character in Oracle for all sessions
2: append the escape character clause to the parameter, like “%%% ESCAPE ''”

Paul