Hello,
Here is a part of the query string:
" where VM_PROPERTY.commercialName like '%"+villaName+"%' "+
The query works fine when I put the villa name directly instead of the dynamic string 'villaName'. When I put the 'villaName' string, it's not taken into consideration.
Can you help me with that please
Thank you beforhand
Zineb
Try
'%'+villaName+'%' + instead....
Thank you for your help.
'%'+villaName+'%' didn't work!
villaName is a string where I put the name of the villa 'palais mehdi' for example.
My query is working in query analyser, but when I put '%"+villaName+"%' in my code, it doesn't give me any error and it doesn't take the villa name into consideration. When I put the name of the villa directly in the query, it's working from the code...I'm confused!
Thank you beforehand
Zineb,
What language are you using to code with? That will help us figure this out with you.
Thank you very much for your trials. I found out that the problem was in a loop I was using in my code. So the synthax '%"+villaName+"%' is right.
Good luck all,