Subject Re: Like query
From Mervyn Bick <invalid@invalid.invalid>
Date Wed, 25 May 2022 12:00:35 +0200
Newsgroups dbase.getting-started

On 2022/05/25 10:54, Akshat Kapoor wrote:
> Good Afternoon Tom,
> This is in case my earlier mail did not help in solving your issue.
>
> I do not have your tables hence cannot open the form.
> Copy paste and execute the following code in command window

Did you try your code with a table containing a fieldname with a space
in it?  It may work in the command window (I haven't tried it there) but
it doesn't work in a program.   When the query opens it finds all the
records but the search return 0. :-(

DBASETUTORIAL10 = new DATABASE()
DBASETUTORIAL10.databaseName = "DBASETUTORIAL"
DBASETUTORIAL10.active = true

INVOICE1 = new QUERY()
INVOICE1.database = DBASETUTORIAL10
INVOICE1.sql = [select * from INVOICE.DBF where lower('Card Name') like
:search]
INVOICE1.params["search"] = '%'
INVOICE1.active = true
?INVOICE1.rowset.count()   //60
INVOICE1.params["search"] = '%ve%'
INVOICE1.requery()
?INVOICE1.rowset.count() //0 should be 2


Mervyn.