Mr Rao.
esto no funciona:
oData:SetFilter("codbar1 LIKE '%RF-10392%'") // NO Funciona
oData:SetFilter("codbar1 LIKE '%RF10392%'") // Si Funciona
Gracias por su atencion
Mr Rao.
esto no funciona:
oData:SetFilter("codbar1 LIKE '%RF-10392%'") // NO Funciona
oData:SetFilter("codbar1 LIKE '%RF10392%'") // Si Funciona
Gracias por su atencion
//setfilter
cFirst := "Santos"
oRs:SetFilter( "FIRST = ?", { rtrim(cFirst) } )
//locate
bSeek := oRs:ExprAsBlock( "first = ?", { TRIM( cFirst ) } )
if oRs:Locate( bSeek )
? "locate",oRs:STATE
endif
//seek
if oRs:seek( cFirst,.t. )
// ? oRs:id, oRs:FieldGet( "first" ), oRs:FieldGet("last"), oRs:age,oRs:state
else
? "no existe"
endifEstimado sysctrl2
cVar := "RS-00887" //------------ el dato contioene un guion
oData:SetFilter("codbar1 LIKE '%" + cVar + "%'") //-----------------------> NO funciona, no filtra
cVar := "RS000887" //------------ el dato contioene un guion
oData:SetFilter("codbar1 LIKE '%" + cVar + "%'") //-----------------------> SI funciona, la variable no contiene guion
el campo codbar1 tiene indice
el problema es que por alguna razon el filtro no evalua cuando el patron de filtro tiene un guion
La tabla debe de tener un indice ordenado por el campo FIRSTIt is not at all necessary to have index for filters to work.
Willi Quintana wrote:Mr Rao.This is a bug in our library. We regret for this. Also thank you for bringing this to our notice.
esto no funciona:
oData:SetFilter("codbar1 LIKE '%RF-10392%'") // NO Funciona
oData:SetFilter("codbar1 LIKE '%RF10392%'") // Si Funciona
Gracias por su atencion
oData:SetFilter("'RF-10392' $ UPPER(codbar1)")Mr Eao, gracias por atenderme...
FW 23.07,
BCC 7.10
Harbour 3.2.0dev (r1904111533)
Saludos
MR. Rao, con tablas de miles de registros con índices es mas rápido
saludos.
sysctrl2 wrote:MR. Rao, con tablas de miles de registros con índices es mas rápidoHere we are not talking about DBF tables. What you said is true for DBF fiters.
saludos.
We fixed the bug and this will work from the next release.
You said you are using FWH2307 with Harbour and BCC.
Please contact me on this email
nageswaragunupudi [at] gmail [dot] com.
I will send you the revised FiveH.lib for FWH2307 with this fix.
Muy agradecido Mr Rao
funciona perfectamente
Just sent revised FiveH.lib (for FWH2307) for Harbour and BCC
Sent through "wetransfer.com"
You must have received a mail from them with link to download.
Please keep a safecopy of your present lib and use this new lib
Please let me know if the filters are working as expected.
Please acknowledge
#include "fivewin.ch"
function Main()
local oCn
local oRs, cFilter
oCn := maria_Connect( "209.250.245.152,fwh,fwhuser,FiveTech@2022" )
oRs := oCn:RowSet( "select * from states" )
cFilter := "NAME Like '%nta-cat%'" // case not sensitive
oRs:SetFilter( cFilter )
? oRs:Filter
oRs:GoTop()
xbrowser oRs title FWVERSION
oRs:Close()
oCn:Close()
return nil