Subject Re: Like query
From Tom <IHaveNoEmail@ddress>
Date Wed, 25 May 2022 10:55:19 -0400
Newsgroups dbase.getting-started

On 5/25/22 4:54 AM, 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
>
> 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
*
Hi Akshat,

My fault for improper database and table selection. I failed to realize
that they would only be available to you or anyone else if you had
already installed Ken's dBase Tutorial. The table suited my purpose
because it contained field names with spaces and a date field. I needed
that to make Mervyn's life more difficult and for me to learn how to
handle those problems with his form. I could not find examples of 'cast'
in my folder of news group responses although I suspected that would be
necessary for the date field. Since you must have the correct syntax and
I got tired of guessing, I decided the easy out was to copy Mervyn's code.

Regards,

Tom