if it does not find them, it sets the first record as default in the nPrimo variable and the last record in the nUltimo variable
if it finds them, it saves the record corresponding to the record found with nYear1 in the variable nPrimo and the record corresponding to the record found with nYear2 in the variable nUltimo.
in the old program i used the locate command but now using tdatabase or tdata i can't get it to work
these are the lines of code from the old program
- Code: Select all Expand view
- locate for year(data) = nanno2
if (Found())
locate for year(data) != nanno2 ;
next 60
endif
if (Found())
nultimo:= RecNo() - 1
else
nultimo:= LastRec()
endif
locate for year(data) = nanno1
if (!Found())
nprimo:= 1
else
nprimo:= RecNo()
endif
how can i do to convert this code to tdatabase?