Code: Select all | Expand
#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
before the filter I see all archive

the filter seems good

After the filter it not show any records , why ?