- Code: Select all Expand view RUN
- #include "fivewin.ch"
request dbfcdx
Function test
local oDbf
local cdbfPath:= cFilePath(GetModuleFileName( GetInstance() )) + "Data\"
local nYear:= year(date())
local cFilter:= "LTRIM(STR(YEAR(FIELD->DATA)))= '" + ltrim(str(nyear)) + "'"
oDbf:= TDatabase():Open( , cdbfPath+"LOTTO", "DBFCDX", .T. )
oDbf:setorder(1)
oDbf:GoTop()
xbrowser odbf
oDbf:SetFilter(cFilter)
oDbf:GoTop()
xbrowser odbf
return nil
the index 1 is on DTOS(DATA)+CONCORSO
before the filter I see all archive
the filter seems good
After the filter it not show any records , why ?