FWH MariaDb/Mysql setfilter problem.

FWH MariaDb/Mysql setfilter problem.

Postby Adolfo » Mon Aug 27, 2018 10:08 pm

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
----------
Asus TUF F15, 32GB Ram, 2 * 1 TB NVME M.2, GTX 1650
User avatar
Adolfo
 
Posts: 860
Joined: Tue Oct 11, 2005 11:57 am
Location: Chile

Re: FWH MariaDb/Mysql setfilter problem.

Postby dutch » Tue Aug 28, 2018 12:19 am

Dear Adolfo,

If you use FWMARIADB, You can use :SetFilter() as xbase syntax.

Code: Select all  Expand view
oDbDato:SetFilter(" 'LASTNAME' $ nombre ")


or
exactly

Code: Select all  Expand view
oDbDato:SetFilter("nombre=?",{"ADO"} )
oDbDato:ReFilter( {"SMITH"} )


or more details
viewtopic.php?f=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
dutch
 
Posts: 1540
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: FWH MariaDb/Mysql setfilter problem.

Postby Adolfo » Tue Aug 28, 2018 12:03 pm

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
----------
Asus TUF F15, 32GB Ram, 2 * 1 TB NVME M.2, GTX 1650
User avatar
Adolfo
 
Posts: 860
Joined: Tue Oct 11, 2005 11:57 am
Location: Chile

Re: FWH MariaDb/Mysql setfilter problem.

Postby nageswaragunupudi » Tue Aug 28, 2018 2:47 pm

Please use simple DBF syntax like this:
Code: Select all  Expand view
oDbDato:SetFilter("'NAME LASTNAME' $ UPPER( nombre )")
 

Rowset filters work exactly like the DBF filters we use.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: FWH MariaDb/Mysql setfilter problem.

Postby Adolfo » Tue Aug 28, 2018 6:37 pm

Thanks... works as exspected


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

http://www.xdata.cl - Desarrollo Inteligente
----------
Asus TUF F15, 32GB Ram, 2 * 1 TB NVME M.2, GTX 1650
User avatar
Adolfo
 
Posts: 860
Joined: Tue Oct 11, 2005 11:57 am
Location: Chile

Re: FWH MariaDb/Mysql setfilter problem.

Postby nageswaragunupudi » Tue Aug 28, 2018 6:49 pm

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
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 40 guests

cron