1. Helge Tjelta
  2. Valentina Server
  3. 月, 12月 30 2019, 09:16 PM
  4.  メールで購読
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 承諾済みの回答
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.
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 承諾済みの回答
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.
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.
  • ページ :
  • 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