1. Helge Tjelta
  2. Valentina Server
  3. Montag, Dezember 30 2019, 09:16 PM
  4.  Abonnieren via E-Mail
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!
Kommentar
There are no comments made yet.
Helge Tjelta Akzeptierte Antwort
Oops, sorry my bad, I had put the % in twice in my code, both in the query and in the binding... sorry. Works now.
Kommentar
There are no comments made yet.
Helge Tjelta Akzeptierte Antwort
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.
Kommentar
There are no comments made yet.
Ruslan Zasukhin Akzeptierte Antwort
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
Kommentar
There are no comments made yet.
Helge Tjelta Akzeptierte Antwort
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
Kommentar
There are no comments made yet.
  • Seite :
  • 1


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