1. Helge Tjelta
  2. Valentina Server
  3. Понедельник, Декабрь 30 2019, 09:16 PM
  4.  Подписаться через email
Hi, I'm finally moving over to binding, and so far so good.

But how do I get the % to work...

I have F1 LIKE '%"+textinput+"%'

and F1 LIKE :1 and also F1 ILIKE :1 works...

But how do I use % with values ?


F1 LIKE '%':1 does not work, nor does %:1

Please help!
Комментарий
There are no comments made yet.
Helge Tjelta Ответ принят
Oops, sorry my bad, I had put the % in twice in my code, both in the query and in the binding... sorry. Works now.
Комментарий
There are no comments made yet.
Helge Tjelta Ответ принят
stmt = mDatabase.Prepare(sql)
tekst = "%"+tekst+"%"
stmt.BindText(0, tekst)

cursAvdoed = stmt.SqlSelect(EVCursorLocation.kServerSide, EVLockType.kNoLocks)


I tried this....

tekst is the text input paramterer and is a string.
Комментарий
There are no comments made yet.
Ruslan Zasukhin Ответ принят
Hi Helge,

did you try

LIKE :1

and set parameter as "%textinput%"

i.e. specify % in the parameter value, as you did with Valentina Studio
Комментарий
There are no comments made yet.
Helge Tjelta Ответ принят
In V-studio I can set the parameter value to be %textinput% and use that...

but doing this in Xojo, does not work... i.e.
textinput = "%"+ textinput +"%"
stmt.BindText(0, textinput)


text input is set to type string
Комментарий
There are no comments made yet.
  • Страница :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.