Page 1 of 1
FWH MariaDb/Mysql setfilter problem.
Posted: Mon Aug 27, 2018 10:08 pm
by Adolfo
Nages...
oDbDato:SetFilter("nombre like '%NAME LASTNAME%'") does not work.
Only oDbDato:SetFilter("nombre like '%LASTNAME%'") works, each time a space is in the filter, it does not work.
Any tip or advice
From Chile Adolfo
Re: FWH MariaDb/Mysql setfilter problem.
Posted: Tue Aug 28, 2018 12:19 am
by dutch
Dear Adolfo,
If you use FWMARIADB, You can use :SetFilter() as xbase syntax.
Code: Select all
oDbDato:SetFilter(" 'LASTNAME' $ nombre ")
or
exactly
Code: Select all
oDbDato:SetFilter("nombre=?",{"ADO"} )
oDbDato:ReFilter( {"SMITH"} )
or more details
http://forums.fivetechsupport.com/viewt ... =3&t=32657
I hope, may help.
Adolfo wrote:Nages...
oDbDato:SetFilter("nombre like '%NAME LASTNAME%'") does not work.
Only oDbDato:SetFilter("nombre like '%LASTNAME%'") works, each time a space is in the filter, it does not work.
Any tip or advice
From Chile Adolfo
Re: FWH MariaDb/Mysql setfilter problem.
Posted: Tue Aug 28, 2018 12:03 pm
by Adolfo
Hi dutch
It wont work... I dont know if the customer is going to enter only the name or both name and lastname.
And it could be any of the fields in a xbrowse, it is created dinamically
The only problem I see, is the space in between the variable you pass to the filter ???
Re: FWH MariaDb/Mysql setfilter problem.
Posted: Tue Aug 28, 2018 2:47 pm
by nageswaragunupudi
Please use simple DBF syntax like this:
Code: Select all
oDbDato:SetFilter("'NAME LASTNAME' $ UPPER( nombre )")
Rowset filters work exactly like the DBF filters we use.
Re: FWH MariaDb/Mysql setfilter problem.
Posted: Tue Aug 28, 2018 6:37 pm
by Adolfo
Thanks... works as exspected
From Chile Adolfo
Re: FWH MariaDb/Mysql setfilter problem.
Posted: Tue Aug 28, 2018 6:49 pm
by nageswaragunupudi
As you said, if the constant has a space character, setting filter with like clause is not working. We did not notice it until you pointed out. It will also work from FWH 18.06 onwards.
Re: FWH MariaDb/Mysql setfilter problem.
Posted: Fri Jan 10, 2025 4:15 pm
by CARLOS ATUNCAR
Mr. nage necesito filtrar _ ejemplo
empresa='0081' .AND. nombres LIKE '%CARLOS%'
como se hace en este caso