FWH MariaDb/Mysql setfilter problem.

Post Reply
User avatar
Adolfo
Posts: 815
Joined: Tue Oct 11, 2005 11:57 am
Location: Chile
Contact:

FWH MariaDb/Mysql setfilter problem.

Post 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
;-) Ji,ji,ji... buena la cosa... "all you need is code"

http://www.xdata.cl - Desarrollo Inteligente
----------
Lenovo Legion Y520, 16GB Ram, 1 TB NVME M.2, 1 TB SSD, GTX 1050
User avatar
dutch
Posts: 1395
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: FWH MariaDb/Mysql setfilter problem.

Post 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
Regards,
Dutch

FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
User avatar
Adolfo
Posts: 815
Joined: Tue Oct 11, 2005 11:57 am
Location: Chile
Contact:

Re: FWH MariaDb/Mysql setfilter problem.

Post 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 ???
;-) Ji,ji,ji... buena la cosa... "all you need is code"

http://www.xdata.cl - Desarrollo Inteligente
----------
Lenovo Legion Y520, 16GB Ram, 1 TB NVME M.2, 1 TB SSD, GTX 1050
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: FWH MariaDb/Mysql setfilter problem.

Post 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.
Regards

G. N. Rao.
Hyderabad, India
User avatar
Adolfo
Posts: 815
Joined: Tue Oct 11, 2005 11:57 am
Location: Chile
Contact:

Re: FWH MariaDb/Mysql setfilter problem.

Post by Adolfo »

Thanks... works as exspected


From Chile Adolfo
;-) Ji,ji,ji... buena la cosa... "all you need is code"

http://www.xdata.cl - Desarrollo Inteligente
----------
Lenovo Legion Y520, 16GB Ram, 1 TB NVME M.2, 1 TB SSD, GTX 1050
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: FWH MariaDb/Mysql setfilter problem.

Post 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.
Regards

G. N. Rao.
Hyderabad, India
Post Reply