1. Helge Tjelta
  2. Valentina Server
  3. Monday, December 30 2019, 09:16 PM
  4.  Subscribe via 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!
Comment
There are no comments made yet.
Helge Tjelta Accepted Answer
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
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Server
  3. # 1
Ruslan Zasukhin Accepted Answer
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
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Server
  3. # 2
Helge Tjelta Accepted Answer
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.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Server
  3. # 3
Helge Tjelta Accepted Answer
Oops, sorry my bad, I had put the % in twice in my code, both in the query and in the binding... sorry. Works now.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Server
  3. # 4
  • Page :
  • 1


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

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories