Subject Re: Like query
From Akshat Kapoor <akshat.kapoor@kapoorsons.in>
Date Wed, 25 May 2022 14:24:40 +0530
Newsgroups dbase.getting-started

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

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

INVOICE1 = new QUERY()INVOICE1.database = DBASETUTORIAL10INVOICE1.sql =
[select * from INVOICE.DBF where lower('Card Name') like
:search]INVOICE1.params["search"] = '%'INVOICE1.active = true
?INVOICE1.rowset.count()
You should see the total number of rows that are there in your table.
INVOICE1.params["search"] = '%ABC%'
INVOICE1.requery()
?INVOICE1.rowset.count()

Replace ABC with suitable value and check the result.


This is another way of fine tuning the sql.

In case you want to change sql then
INVOICE1.active = false
INVOICE1.sql = [] your new sql
INVOICE1.active = true
?INVOICE1.rowset.count()

This is untested code.

Regards
Akshat